]> git.meshlink.io Git - catta/blobdiff - configure.ac
* many trivial fix to make avahi compile on OpenBSD
[catta] / configure.ac
index f4080f7a52b9f06d5ed4b117225dea26cc8eb37b..531e015701966f5cc2d8a30e26a643b9dbfae60e 100644 (file)
@@ -155,7 +155,7 @@ test_gcc_flag() {
 # If using GCC specify some additional parameters
 if test "x$GCC" = "xyes" ; then
 
-    DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wlarger-than-4000 -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter"
+    DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline"
 
     if test "x$HAVE_NETLINK" = "xyes" ; then
         # Test whether rtnetlink.h can be included when compiled with -std=c99
@@ -206,7 +206,7 @@ AC_FUNC_MEMCMP
 AC_FUNC_SELECT_ARGTYPES
 AC_FUNC_MALLOC
 AC_FUNC_REALLOC
-AC_CHECK_FUNCS([gethostname memchr memmove memset mkdir select socket strchr strcspn strdup strerror strrchr strspn strstr uname setresuid setreuid strcasecmp gettimeofday putenv strncasecmp strlcpy gethostbyname])
+AC_CHECK_FUNCS([gethostname memchr memmove memset mkdir select socket strchr strcspn strdup strerror strrchr strspn strstr uname setresuid setreuid setresgid setregid strcasecmp gettimeofday putenv strncasecmp strlcpy gethostbyname seteuid setegid])
 
 AC_FUNC_CHOWN
 AC_FUNC_STAT
@@ -392,6 +392,28 @@ if test "x$HAVE_EXPAT" = "xyes" ; then
 fi
 AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")
 
+#
+# GDBM
+#
+AC_ARG_ENABLE(gdbm,
+        AS_HELP_STRING([--disable-gdbm],[Disable use of GDBM]),
+        [case "${enableval}" in
+                yes) HAVE_GDBM=yes ;;
+                no)  HAVE_GDBM=no ;;
+                *) AC_MSG_ERROR(bad value ${enableval} for --enable-gdbm) ;;
+        esac],
+        [HAVE_GDBM=yes]) 
+
+if test "x$HAVE_GDBM" = "xyes" ; then
+    AC_CHECK_LIB(gdbm, gdbm_open, [ AC_CHECK_HEADERS(gdbm.h, have_gdbm=true, have_gdbm=false) ], have_gdbm=false)
+
+    if ! $have_gdbm ; then
+        AC_MSG_WARN([*** libgdbm not found ***])
+    fi
+    AC_DEFINE([HAVE_GDBM],[],[Support for GDBM])
+fi
+AM_CONDITIONAL(HAVE_GDBM, test "x$HAVE_GDBM" = "xyes")
+
 #
 # libdaemon
 #
@@ -696,6 +718,7 @@ echo "
     Enable GTK:             ${HAVE_GTK}
     Enable D-BUS:           ${HAVE_DBUS}
     Enable Expat:           ${HAVE_EXPAT}
+    Enable GDBM:            ${HAVE_GDBM}
     Enable libdaemon:       ${HAVE_LIBDAEMON}
     Enable Python:          ${HAVE_PYTHON}
     Enable pygtk:           ${HAVE_PYGTK}