[xplc-cvs] xplc configure.ac,1.38,1.39
Cross-platform lightweight components
Status: Alpha
Brought to you by:
pphaneuf
From: Simon L. <sf...@us...> - 2005-10-21 13:18:38
|
Update of /cvsroot/xplc/xplc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4380 Modified Files: configure.ac Log Message: Add a UUID generation program that also spits out XPLC C definitions. This is supposed to be quite portable, so I've only used what POSIX gives us. http://bugs.debian.org/310755 Index: configure.ac =================================================================== RCS file: /cvsroot/xplc/xplc/configure.ac,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** configure.ac 21 Oct 2005 13:03:02 -0000 1.38 --- configure.ac 21 Oct 2005 13:18:22 -0000 1.39 *************** *** 70,77 **** --- 70,82 ---- [dyld])) + AC_ARG_WITH(libuuid, + AC_HELP_STRING([--with-libuuid], + [libuuid])) + AC_CONFIG_SRCDIR([include/xplc/xplc.h]) AC_LANG(C++) + AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL *************** *** 115,120 **** fi if test "$enable_optimization" != "no"; then ! CXXFLAGS="$CXXFLAGS -O2" fi --- 120,159 ---- fi + dnl Do some checks for uuid/ since no native library is available + with_uuid=no + if test "$with_uuid" == "no" && test "$with_libuuid" != "no"; then + AC_CHECK_HEADERS(uuid/uuid.h, + AC_CHECK_LIB(uuid, uuid_unparse, + with_uuid=-luuid)) + fi + if test "$with_uuid" == "no"; then + AC_CHECK_SIZEOF(short) + AC_CHECK_SIZEOF(int) + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(long long) + SIZEOF_SHORT=$ac_cv_sizeof_short + SIZEOF_INT=$ac_cv_sizeof_int + SIZEOF_LONG=$ac_cv_sizeof_long + SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long + AC_SUBST(SIZEOF_SHORT) + AC_SUBST(SIZEOF_INT) + AC_SUBST(SIZEOF_LONG) + AC_SUBST(SIZEOF_LONG_LONG) + AC_CHECK_HEADERS([inttypes.h stdlib.h unistd.h]) + AC_CHECK_HEADERS([net/if.h net/if_dl.h netinet/in.h]) + AC_CHECK_HEADERS([sys/ioctl.h sys/socket.h sys/sockio.h]) + AC_CHECK_FUNCS(srandom) + AC_CHECK_MEMBER(struct sockaddr.sa_len, + AC_DEFINE_UNQUOTED(HAVE_SA_LEN, + 1, + [Define if struct sockaddr contains sa_len]),, + [#include <sys/typesDD.h> + #include <sys/socket.h>]) + with_uuid= + with_uuid_static=uuid/libuuid.a + fi + if test "$enable_optimization" != "no"; then ! CFLAGS="$CFLAGS -O2" fi *************** *** 124,141 **** if test "$enable_debug" != "no"; then ! CXXFLAGS="$CXXFLAGS -ggdb -DDEBUG" if test "$enable_debug" != "yes"; then ! CXXFLAGS="$CXXFLAGS -DDEBUG_$enable_debug" fi else ! CXXFLAGS="$CXXFLAGS -DNDEBUG" fi if test "$enable_fatal_warnings" = "yes"; then ! CXXFLAGS="$CXXFLAGS -Werror" fi if test "$enable_warnings" != "no"; then ! CXXFLAGS="$CXXFLAGS -Wall -Woverloaded-virtual" if test "$enable_warnings" = "yes"; then CXXFLAGS="$CXXFLAGS -Wold-style-cast" --- 163,181 ---- if test "$enable_debug" != "no"; then ! CFLAGS="$CFLAGS -ggdb -DDEBUG" if test "$enable_debug" != "yes"; then ! CFLAGS="$CFLAGS -DDEBUG_$enable_debug" fi else ! CFLAGS="$CFLAGS -DNDEBUG" fi if test "$enable_fatal_warnings" = "yes"; then ! CFLAGS="$CFLAGS -Werror" fi if test "$enable_warnings" != "no"; then ! CFLAGS="$CFLAGS -Wall" ! CXXFLAGS="$CXXFLAGS -Woverloaded-virtual" if test "$enable_warnings" = "yes"; then CXXFLAGS="$CXXFLAGS -Wold-style-cast" *************** *** 152,156 **** if test "$enable_pic" != "no"; then ! CXXFLAGS="$CXXFLAGS -fpic" fi --- 192,196 ---- if test "$enable_pic" != "no"; then ! CFLAGS="$CFLAGS -fpic" fi *************** *** 166,172 **** if test "$enable_unstable" = "yes"; then ! CXXFLAGS="$CXXFLAGS -DUNSTABLE" fi AC_SUBST(pc_version) AC_SUBST(xplcdir_version) --- 206,214 ---- if test "$enable_unstable" = "yes"; then ! CFLAGS="$CFLAGS -DUNSTABLE" fi + CXXFLAGS="$CXXFLAGS $CFLAGS" + AC_SUBST(pc_version) AC_SUBST(xplcdir_version) *************** *** 175,181 **** AC_SUBST(with_dlopen) AC_SUBST(so_style) AC_SUBST(CVS2CL) ! AC_CONFIG_FILES([config/config.mk dist/xplc.pc dist/xplc-uninstalled.pc examples/simple-module/Makefile examples/simple-module-user/Makefile]) AC_CONFIG_HEADERS([include/autoconf.h]) --- 217,229 ---- AC_SUBST(with_dlopen) AC_SUBST(so_style) + AC_SUBST(with_uuid) + AC_SUBST(with_uuid_static) AC_SUBST(CVS2CL) ! AC_CONFIG_FILES([config/config.mk]) ! AC_CONFIG_FILES([dist/xplc.pc dist/xplc-uninstalled.pc]) ! AC_CONFIG_FILES([examples/simple-module/Makefile]) ! AC_CONFIG_FILES([examples/simple-module-user/Makefile]) ! AC_CONFIG_FILES([uuid/uuid_types.h]) AC_CONFIG_HEADERS([include/autoconf.h]) |