Chris@4: AC_PREREQ(2.57) Chris@4: Chris@4: AC_INIT([liblo], [0.26], [liblo-devel@lists.sourceforge.net]) Chris@4: Chris@4: # libtool version: current:revision:age Chris@4: # Chris@4: # If the library source code has changed at all since the last update, then Chris@4: # increment revision (`c:r:a' becomes `c:r+1:a'). Chris@4: # Chris@4: # If any interfaces have been added, removed, or changed since the last update, Chris@4: # increment current, and set revision to 0. Chris@4: # Chris@4: # If any interfaces have been added since the last public release, then Chris@4: # increment age. Chris@4: # Chris@4: # If any interfaces have been removed since the last public release, then set Chris@4: # age to 0. Chris@4: LO_SO_VERSION=7:0:0 Chris@4: Chris@4: AC_CONFIG_SRCDIR([src/address.c]) Chris@4: AM_CONFIG_HEADER([config.h]) Chris@4: Chris@4: AM_INIT_AUTOMAKE Chris@4: Chris@4: AC_ENABLE_STATIC(no) Chris@4: AC_ENABLE_SHARED(yes) Chris@4: AC_SUBST(LO_SO_VERSION) Chris@4: Chris@4: # disable support for ipv6. Chris@4: AC_ARG_ENABLE(ipv6, [ --enable-ipv6 Enable ipv6 support],want_ipv6=yes,) Chris@4: if test "$want_ipv6" = "yes"; then Chris@4: AC_DEFINE(ENABLE_IPV6, 1, Define this to enable ipv6.) Chris@4: fi Chris@4: Chris@4: # Checks for programs. Chris@4: AC_PROG_CC Chris@4: AM_PROG_LIBTOOL Chris@4: AM_PROG_CC_C_O Chris@4: AC_CHECK_PROG([DOXYGEN], [doxygen], [doc], []) Chris@4: AC_SUBST(DOXYGEN) Chris@4: Chris@4: # Checks for libraries. Chris@4: AC_CHECK_LIB([pthread], [pthread_create]) Chris@4: AC_SEARCH_LIBS([recvfrom], [socket]) Chris@4: AC_CHECK_FUNC([log], [], [AC_CHECK_LIB([m],[log])]) Chris@4: Chris@4: # Checks for header files. Chris@4: AC_HEADER_STDC Chris@4: AC_CHECK_HEADERS([netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h]) Chris@4: Chris@4: # Checks for typedefs, structures, and compiler characteristics. Chris@4: AC_C_CONST Chris@4: AC_TYPE_SIZE_T Chris@4: Chris@4: # Check for features Chris@4: AC_CHECK_FUNC([select], [AC_DEFINE(HAVE_SELECT, [1], [Define to 1 if select() is available.])], [ Chris@4: AC_MSG_CHECKING([for select in ws2_32]) Chris@4: LIBS="$LIBS -lws2_32" Chris@4: # some winsock2 functions require XP, so WINNT=0x501 Chris@4: CFLAGS="$CFLAGS -DWIN32 -D_WIN32_WINNT=0x501" Chris@4: AC_TRY_LINK([#include ], Chris@4: [select(0,0,0,0,0)], Chris@4: [AC_MSG_RESULT(yes) Chris@4: AC_DEFINE(HAVE_SELECT, [1], [Define to 1 if select() is available.])], Chris@4: [AC_MSG_RESULT(no)]) Chris@4: ]) Chris@4: AC_CHECK_FUNC([poll], [AC_DEFINE(HAVE_POLL, [1], [Define to 1 if poll() is available.])]) Chris@4: AC_CHECK_FUNC([inet_aton], [AC_DEFINE(HAVE_INET_ATON, [1], [Define to 1 if inet_aton() is available.])]) Chris@4: Chris@4: AC_C_BIGENDIAN([LO_BIGENDIAN="1"], [LO_BIGENDIAN="0"]) Chris@4: AC_DEFINE_UNQUOTED(LO_BIGENDIAN, "$LO_BIGENDIAN", [If machine is bigendian]) Chris@4: AC_SUBST(LO_BIGENDIAN) Chris@4: Chris@4: AC_CONFIG_FILES([ Chris@4: Makefile Chris@4: src/Makefile Chris@4: src/tools/Makefile Chris@4: examples/Makefile Chris@4: lo/Makefile Chris@4: lo/lo_endian.h Chris@4: liblo.pc Chris@4: doc/Makefile Chris@4: doc/reference.doxygen Chris@4: build/Makefile Chris@4: ]) Chris@4: AC_OUTPUT()