configure

changeset 6
9db76e20e21e
parent 2
217c90acc389
child 7
d74b26b2f217
equal deleted inserted replaced
5:8c44725dc4ad 6:9db76e20e21e
1394 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1394 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1395 as_fn_set_status $ac_retval 1395 as_fn_set_status $ac_retval
1396 1396
1397 } # ac_fn_c_try_compile 1397 } # ac_fn_c_try_compile
1398 1398
1399 # ac_fn_c_try_link LINENO
1400 # -----------------------
1401 # Try to link conftest.$ac_ext, and return whether this succeeded.
1402 ac_fn_c_try_link ()
1403 {
1404 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1405 rm -f conftest.$ac_objext conftest$ac_exeext
1406 if { { ac_try="$ac_link"
1407 case "(($ac_try" in
1408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1409 *) ac_try_echo=$ac_try;;
1410 esac
1411 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1412 $as_echo "$ac_try_echo"; } >&5
1413 (eval "$ac_link") 2>conftest.err
1414 ac_status=$?
1415 if test -s conftest.err; then
1416 grep -v '^ *+' conftest.err >conftest.er1
1417 cat conftest.er1 >&5
1418 mv -f conftest.er1 conftest.err
1419 fi
1420 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1421 test $ac_status = 0; } && {
1422 test -z "$ac_c_werror_flag" ||
1423 test ! -s conftest.err
1424 } && test -s conftest$ac_exeext && {
1425 test "$cross_compiling" = yes ||
1426 test -x conftest$ac_exeext
1427 }; then :
1428 ac_retval=0
1429 else
1430 $as_echo "$as_me: failed program was:" >&5
1431 sed 's/^/| /' conftest.$ac_ext >&5
1432
1433 ac_retval=1
1434 fi
1435 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1436 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1437 # interfere with the next link command; also delete a directory that is
1438 # left behind by Apple's compiler. We do this before executing the actions.
1439 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1440 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1441 as_fn_set_status $ac_retval
1442
1443 } # ac_fn_c_try_link
1444
1399 # ac_fn_c_try_cpp LINENO 1445 # ac_fn_c_try_cpp LINENO
1400 # ---------------------- 1446 # ----------------------
1401 # Try to preprocess conftest.$ac_ext, and return whether this succeeded. 1447 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1402 ac_fn_c_try_cpp () 1448 ac_fn_c_try_cpp ()
1403 { 1449 {
2843 fi 2889 fi
2844 2890
2845 2891
2846 2892
2847 # 2893 #
2894 # Libraries for mbsePi-apps
2895 #
2896
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mosquitto_lib_init in -lmosquitto" >&5
2898 $as_echo_n "checking for mosquitto_lib_init in -lmosquitto... " >&6; }
2899 if ${ac_cv_lib_mosquitto_mosquitto_lib_init+:} false; then :
2900 $as_echo_n "(cached) " >&6
2901 else
2902 ac_check_lib_save_LIBS=$LIBS
2903 LIBS="-lmosquitto $LIBS"
2904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2905 /* end confdefs.h. */
2906
2907 /* Override any GCC internal prototype to avoid an error.
2908 Use char because int might match the return type of a GCC
2909 builtin and then its argument prototype would still apply. */
2910 #ifdef __cplusplus
2911 extern "C"
2912 #endif
2913 char mosquitto_lib_init ();
2914 int
2915 main ()
2916 {
2917 return mosquitto_lib_init ();
2918 ;
2919 return 0;
2920 }
2921 _ACEOF
2922 if ac_fn_c_try_link "$LINENO"; then :
2923 ac_cv_lib_mosquitto_mosquitto_lib_init=yes
2924 else
2925 ac_cv_lib_mosquitto_mosquitto_lib_init=no
2926 fi
2927 rm -f core conftest.err conftest.$ac_objext \
2928 conftest$ac_exeext conftest.$ac_ext
2929 LIBS=$ac_check_lib_save_LIBS
2930 fi
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mosquitto_mosquitto_lib_init" >&5
2932 $as_echo "$ac_cv_lib_mosquitto_mosquitto_lib_init" >&6; }
2933 if test "x$ac_cv_lib_mosquitto_mosquitto_lib_init" = xyes; then :
2934 result=yes
2935 else
2936 result=no
2937 fi
2938
2939 if test "$result" = "yes"; then
2940 LIBS="$LIBS -lmosquitto"
2941 else
2942 as_fn_error $? "libmosquitto not found" "$LINENO" 5
2943 fi
2944
2945 #
2848 # Additional commandline switches 2946 # Additional commandline switches
2849 # 2947 #
2850 # Check whether --enable-experiment was given. 2948 # Check whether --enable-experiment was given.
2851 if test "${enable_experiment+set}" = set; then : 2949 if test "${enable_experiment+set}" = set; then :
2852 enableval=$enable_experiment; experiment=$enableval 2950 enableval=$enable_experiment; experiment=$enableval
2869 if test "$debugging" = "yes"; then 2967 if test "$debugging" = "yes"; then
2870 CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" 2968 CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline"
2871 else 2969 else
2872 CFLAGS="-g -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" 2970 CFLAGS="-g -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline"
2873 fi 2971 fi
2874
2875 2972
2876 ac_ext=c 2973 ac_ext=c
2877 ac_cpp='$CPP $CPPFLAGS' 2974 ac_cpp='$CPP $CPPFLAGS'
2878 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2975 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2879 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2976 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'

mercurial