3048 |
3048 |
3049 |
3049 |
3050 # |
3050 # |
3051 # Libraries for mbsePi-apps |
3051 # Libraries for mbsePi-apps |
3052 # |
3052 # |
3053 WIRINGPI=No |
3053 MOSQUITTO=No |
3054 |
3054 |
3055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wiringPiSetup in -lwiringPi" >&5 |
3055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mosquitto_lib_init in -lmosquitto" >&5 |
3056 $as_echo_n "checking for wiringPiSetup in -lwiringPi... " >&6; } |
3056 $as_echo_n "checking for mosquitto_lib_init in -lmosquitto... " >&6; } |
3057 if ${ac_cv_lib_wiringPi_wiringPiSetup+:} false; then : |
3057 if ${ac_cv_lib_mosquitto_mosquitto_lib_init+:} false; then : |
3058 $as_echo_n "(cached) " >&6 |
3058 $as_echo_n "(cached) " >&6 |
3059 else |
3059 else |
3060 ac_check_lib_save_LIBS=$LIBS |
3060 ac_check_lib_save_LIBS=$LIBS |
3061 LIBS="-lwiringPi $LIBS" |
3061 LIBS="-lmosquitto $LIBS" |
3062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3063 /* end confdefs.h. */ |
3063 /* end confdefs.h. */ |
3064 |
3064 |
3065 /* Override any GCC internal prototype to avoid an error. |
3065 /* Override any GCC internal prototype to avoid an error. |
3066 Use char because int might match the return type of a GCC |
3066 Use char because int might match the return type of a GCC |
3067 builtin and then its argument prototype would still apply. */ |
3067 builtin and then its argument prototype would still apply. */ |
3068 #ifdef __cplusplus |
3068 #ifdef __cplusplus |
3069 extern "C" |
3069 extern "C" |
3070 #endif |
3070 #endif |
3071 char wiringPiSetup (); |
3071 char mosquitto_lib_init (); |
3072 int |
3072 int |
3073 main () |
3073 main () |
3074 { |
3074 { |
3075 return wiringPiSetup (); |
3075 return mosquitto_lib_init (); |
3076 ; |
3076 ; |
3077 return 0; |
3077 return 0; |
3078 } |
3078 } |
3079 _ACEOF |
3079 _ACEOF |
3080 if ac_fn_c_try_link "$LINENO"; then : |
3080 if ac_fn_c_try_link "$LINENO"; then : |
3081 ac_cv_lib_wiringPi_wiringPiSetup=yes |
3081 ac_cv_lib_mosquitto_mosquitto_lib_init=yes |
3082 else |
3082 else |
3083 ac_cv_lib_wiringPi_wiringPiSetup=no |
3083 ac_cv_lib_mosquitto_mosquitto_lib_init=no |
3084 fi |
3084 fi |
3085 rm -f core conftest.err conftest.$ac_objext \ |
3085 rm -f core conftest.err conftest.$ac_objext \ |
3086 conftest$ac_exeext conftest.$ac_ext |
3086 conftest$ac_exeext conftest.$ac_ext |
3087 LIBS=$ac_check_lib_save_LIBS |
3087 LIBS=$ac_check_lib_save_LIBS |
3088 fi |
3088 fi |
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wiringPi_wiringPiSetup" >&5 |
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mosquitto_mosquitto_lib_init" >&5 |
3090 $as_echo "$ac_cv_lib_wiringPi_wiringPiSetup" >&6; } |
3090 $as_echo "$ac_cv_lib_mosquitto_mosquitto_lib_init" >&6; } |
3091 if test "x$ac_cv_lib_wiringPi_wiringPiSetup" = xyes; then : |
3091 if test "x$ac_cv_lib_mosquitto_mosquitto_lib_init" = xyes; then : |
3092 result=yes |
3092 result=yes |
3093 else |
3093 else |
3094 result=no |
3094 result=no |
3095 fi |
3095 fi |
3096 |
3096 |
3097 if test "$result" = "yes"; then |
3097 if test "$result" = "yes"; then |
3098 LIBS="$LIBS -lwiringPi -lwiringPiDev" |
|
3099 ac_ext=c |
3098 ac_ext=c |
3100 ac_cpp='$CPP $CPPFLAGS' |
3099 ac_cpp='$CPP $CPPFLAGS' |
3101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
3100 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
3102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
3101 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
3103 ac_compiler_gnu=$ac_cv_c_compiler_gnu |
3102 ac_compiler_gnu=$ac_cv_c_compiler_gnu |
3491 fi |
3490 fi |
3492 |
3491 |
3493 done |
3492 done |
3494 |
3493 |
3495 |
3494 |
3496 for ac_header in wiringPi.h |
3495 for ac_header in mosquitto.h |
|
3496 do : |
|
3497 ac_fn_c_check_header_mongrel "$LINENO" "mosquitto.h" "ac_cv_header_mosquitto_h" "$ac_includes_default" |
|
3498 if test "x$ac_cv_header_mosquitto_h" = xyes; then : |
|
3499 cat >>confdefs.h <<_ACEOF |
|
3500 #define HAVE_MOSQUITTO_H 1 |
|
3501 _ACEOF |
|
3502 MOSQUITTO=Yes |
|
3503 else |
|
3504 MOSQUITTO=No |
|
3505 fi |
|
3506 |
|
3507 done |
|
3508 |
|
3509 LIBS="$LIBS -lmosquitto" |
|
3510 fi |
|
3511 |
|
3512 WIRINGPI=No |
|
3513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wiringPiSetup in -lwiringPi" >&5 |
|
3514 $as_echo_n "checking for wiringPiSetup in -lwiringPi... " >&6; } |
|
3515 if ${ac_cv_lib_wiringPi_wiringPiSetup+:} false; then : |
|
3516 $as_echo_n "(cached) " >&6 |
|
3517 else |
|
3518 ac_check_lib_save_LIBS=$LIBS |
|
3519 LIBS="-lwiringPi $LIBS" |
|
3520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
3521 /* end confdefs.h. */ |
|
3522 |
|
3523 /* Override any GCC internal prototype to avoid an error. |
|
3524 Use char because int might match the return type of a GCC |
|
3525 builtin and then its argument prototype would still apply. */ |
|
3526 #ifdef __cplusplus |
|
3527 extern "C" |
|
3528 #endif |
|
3529 char wiringPiSetup (); |
|
3530 int |
|
3531 main () |
|
3532 { |
|
3533 return wiringPiSetup (); |
|
3534 ; |
|
3535 return 0; |
|
3536 } |
|
3537 _ACEOF |
|
3538 if ac_fn_c_try_link "$LINENO"; then : |
|
3539 ac_cv_lib_wiringPi_wiringPiSetup=yes |
|
3540 else |
|
3541 ac_cv_lib_wiringPi_wiringPiSetup=no |
|
3542 fi |
|
3543 rm -f core conftest.err conftest.$ac_objext \ |
|
3544 conftest$ac_exeext conftest.$ac_ext |
|
3545 LIBS=$ac_check_lib_save_LIBS |
|
3546 fi |
|
3547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wiringPi_wiringPiSetup" >&5 |
|
3548 $as_echo "$ac_cv_lib_wiringPi_wiringPiSetup" >&6; } |
|
3549 if test "x$ac_cv_lib_wiringPi_wiringPiSetup" = xyes; then : |
|
3550 result=yes |
|
3551 else |
|
3552 result=no |
|
3553 fi |
|
3554 |
|
3555 if test "$result" = "yes"; then |
|
3556 LIBS="$LIBS -lwiringPi -lwiringPiDev" |
|
3557 for ac_header in wiringPi.h |
3497 do : |
3558 do : |
3498 ac_fn_c_check_header_mongrel "$LINENO" "wiringPi.h" "ac_cv_header_wiringPi_h" "$ac_includes_default" |
3559 ac_fn_c_check_header_mongrel "$LINENO" "wiringPi.h" "ac_cv_header_wiringPi_h" "$ac_includes_default" |
3499 if test "x$ac_cv_header_wiringPi_h" = xyes; then : |
3560 if test "x$ac_cv_header_wiringPi_h" = xyes; then : |
3500 cat >>confdefs.h <<_ACEOF |
3561 cat >>confdefs.h <<_ACEOF |
3501 #define HAVE_WIRINGPI_H 1 |
3562 #define HAVE_WIRINGPI_H 1 |
5136 Configuration summary : |
5197 Configuration summary : |
5137 |
5198 |
5138 Version : ............ ${VERSION} |
5199 Version : ............ ${VERSION} |
5139 Main directory : ..... ${prefix} |
5200 Main directory : ..... ${prefix} |
5140 WiringPi : ........... ${WIRINGPI} |
5201 WiringPi : ........... ${WIRINGPI} |
|
5202 MQTT : ............... ${MOSQUITTO} |
5141 SDL library : ........ ${SDL} |
5203 SDL library : ........ ${SDL} |
5142 Simulator : .......... ${SIMULATOR} |
5204 Simulator : .......... ${SIMULATOR} |
5143 |
5205 |
5144 Now type 'make' and 'sudo make install' |
5206 Now type 'make' and 'sudo make install' |
5145 " >&5 |
5207 " >&5 |
5149 Configuration summary : |
5211 Configuration summary : |
5150 |
5212 |
5151 Version : ............ ${VERSION} |
5213 Version : ............ ${VERSION} |
5152 Main directory : ..... ${prefix} |
5214 Main directory : ..... ${prefix} |
5153 WiringPi : ........... ${WIRINGPI} |
5215 WiringPi : ........... ${WIRINGPI} |
|
5216 MQTT : ............... ${MOSQUITTO} |
5154 SDL library : ........ ${SDL} |
5217 SDL library : ........ ${SDL} |
5155 Simulator : .......... ${SIMULATOR} |
5218 Simulator : .......... ${SIMULATOR} |
5156 |
5219 |
5157 Now type 'make' and 'sudo make install' |
5220 Now type 'make' and 'sudo make install' |
5158 " >&6; } |
5221 " >&6; } |