# HG changeset patch # User Michiel Broek # Date 1406576463 -7200 # Node ID 4f21ffc16cd4a22e755cbedd1fbf012ccb00369a # Parent f19a52a25ff5a83f07d1c4bbf0f2d0ba5d3b7ab2 Bumped to version 0.0.11. Added owserver C api. diff -r f19a52a25ff5 -r 4f21ffc16cd4 Makefile.global.in --- a/Makefile.global.in Sun Jul 27 21:04:57 2014 +0200 +++ b/Makefile.global.in Mon Jul 28 21:41:03 2014 +0200 @@ -19,7 +19,7 @@ TAR = @TAR@ RANLIB = @RANLIB@ -CFLAGS = @CFLAGS@ -DVARDIR=@prefix@/var +CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LIBS = @LIBS@ diff -r f19a52a25ff5 -r 4f21ffc16cd4 config.h.in --- a/config.h.in Sun Jul 27 21:04:57 2014 +0200 +++ b/config.h.in Mon Jul 28 21:41:03 2014 +0200 @@ -14,3 +14,6 @@ /* Define if you have the header file. */ #undef HAVE_MOSQUITTO_H + +/* Define if you have the header file. */ +#undef HAVE_OWNETAPI_H diff -r f19a52a25ff5 -r 4f21ffc16cd4 configure --- a/configure Sun Jul 27 21:04:57 2014 +0200 +++ b/configure Mon Jul 28 21:41:03 2014 +0200 @@ -2032,7 +2032,7 @@ PACKAGE="mbsePi-apps" -VERSION="0.0.10" +VERSION="0.0.11" COPYRIGHT="Copyright (C) 2014 Michiel Broek, All Rights Reserved" CYEARS="2014" @@ -3567,6 +3567,67 @@ fi +OWSERVER=No +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OWNET_init in -lownet" >&5 +$as_echo_n "checking for OWNET_init in -lownet... " >&6; } +if ${ac_cv_lib_ownet_OWNET_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lownet $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char OWNET_init (); +int +main () +{ +return OWNET_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ownet_OWNET_init=yes +else + ac_cv_lib_ownet_OWNET_init=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ownet_OWNET_init" >&5 +$as_echo "$ac_cv_lib_ownet_OWNET_init" >&6; } +if test "x$ac_cv_lib_ownet_OWNET_init" = xyes; then : + result=yes +else + result=no +fi + +if test "$result" = "yes"; then + LIBS="$LIBS -lownet" + for ac_header in ownetapi.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ownetapi.h" "ac_cv_header_ownetapi_h" "$ac_includes_default" +if test "x$ac_cv_header_ownetapi_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OWNETAPI_H 1 +_ACEOF + OWSERVER=Yes +else + OWSERVER=No +fi + +done + +fi + # # Additional commandline switches @@ -5119,6 +5180,7 @@ Version : ............ ${VERSION} Main directory : ..... ${prefix} WiringPi : ........... ${WIRINGPI} + OWserver : ........... ${OWSERVER} Now type 'make' and 'sudo make install' " >&5 @@ -5130,6 +5192,7 @@ Version : ............ ${VERSION} Main directory : ..... ${prefix} WiringPi : ........... ${WIRINGPI} + OWserver : ........... ${OWSERVER} Now type 'make' and 'sudo make install' " >&6; } diff -r f19a52a25ff5 -r 4f21ffc16cd4 configure.ac --- a/configure.ac Sun Jul 27 21:04:57 2014 +0200 +++ b/configure.ac Mon Jul 28 21:41:03 2014 +0200 @@ -8,7 +8,7 @@ dnl General settings dnl After changeing the version number, run autoconf! PACKAGE="mbsePi-apps" -VERSION="0.0.10" +VERSION="0.0.11" COPYRIGHT="Copyright (C) 2014 Michiel Broek, All Rights Reserved" CYEARS="2014" AC_SUBST(PACKAGE) @@ -46,6 +46,13 @@ AC_CHECK_HEADERS(wiringPi.h,WIRINGPI=Yes,WIRINGPI=No) fi +OWSERVER=No +AC_CHECK_LIB(ownet,OWNET_init,result=yes,result=no) +if test "$result" = "yes"; then + LIBS="$LIBS -lownet" + AC_CHECK_HEADERS(ownetapi.h,OWSERVER=Yes,OWSERVER=No) +fi + # # Additional commandline switches @@ -100,6 +107,7 @@ Version : ............ ${VERSION} Main directory : ..... ${prefix} WiringPi : ........... ${WIRINGPI} + OWserver : ........... ${OWSERVER} Now type 'make' and 'sudo make install' ])