aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2007-09-09 21:32:12 +0000
committerChristian Grothoff <christian@grothoff.org>2007-09-09 21:32:12 +0000
commitfb36fb2009a35e48be28df422af5a4b42d099cda (patch)
tree103c9372286a794293b36bcc0e18e091bde49f3d /configure.ac
parent8ce09efc5e3c19d413727e8b80c5f2eff9406b38 (diff)
downloadlibmicrohttpd-fb36fb2009a35e48be28df422af5a4b42d099cda.tar.gz
libmicrohttpd-fb36fb2009a35e48be28df422af5a4b42d099cda.zip
release
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 25 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 1db29b83..8178c479 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,7 @@ AC_PROG_INSTALL
34AC_PROG_LN_S 34AC_PROG_LN_S
35AC_PROG_MAKE_SET 35AC_PROG_MAKE_SET
36AC_CANONICAL_HOST 36AC_CANONICAL_HOST
37AM_PROG_LIBTOOL 37AC_PROG_LIBTOOL
38 38
39# set GCC options 39# set GCC options
40# use '-fno-strict-aliasing', but only if the compiler can take it 40# use '-fno-strict-aliasing', but only if the compiler can take it
@@ -49,44 +49,54 @@ case "$host_os" in
49 AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system]) 49 AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system])
50 CFLAGS="-no-cpp-precomp $CFLAGS" 50 CFLAGS="-no-cpp-precomp $CFLAGS"
51 LDFLAGS="-flat_namespace -undefined suppress $LDFLAGS" 51 LDFLAGS="-flat_namespace -undefined suppress $LDFLAGS"
52 AM_CONDITIONAL(HAVE_GNU_LD, false)
52 ;; 53 ;;
53linux*) 54linux*)
54 AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system]) 55 AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
56 AM_CONDITIONAL(HAVE_GNU_LD, true)
55 ;; 57 ;;
56freebsd*) 58freebsd*)
57 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system]) 59 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
58 AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system]) 60 AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
61 AM_CONDITIONAL(HAVE_GNU_LD, true)
59 CFLAGS="-D_THREAD_SAFE $CFLAGS" 62 CFLAGS="-D_THREAD_SAFE $CFLAGS"
60 ;; 63 ;;
61openbsd*) 64openbsd*)
62 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system]) 65 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
63 AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system]) 66 AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
67 AM_CONDITIONAL(HAVE_GNU_LD, true)
64 ;; 68 ;;
65netbsd*) 69netbsd*)
66 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system]) 70 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
67 AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system]) 71 AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
72 AM_CONDITIONAL(HAVE_GNU_LD, true)
68 ;; 73 ;;
69*solaris*) 74*solaris*)
70 AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system]) 75 AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
71 AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work]) 76 AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work])
77 AM_CONDITIONAL(HAVE_GNU_LD, false)
72 ;; 78 ;;
73*arm-linux*) 79*arm-linux*)
74 AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system]) 80 AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
75 CFLAGS="-D_REENTRANT -fPIC -pipe $CFLAGS" 81 CFLAGS="-D_REENTRANT -fPIC -pipe $CFLAGS"
82 AM_CONDITIONAL(HAVE_GNU_LD, true)
76 ;; 83 ;;
77*cygwin*) 84*cygwin*)
78 AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system]) 85 AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
79 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system]) 86 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
87 AM_CONDITIONAL(HAVE_GNU_LD, false)
80 LDFLAGS="$LDFLAGS -no-undefined" 88 LDFLAGS="$LDFLAGS -no-undefined"
81 ;; 89 ;;
82*mingw*) 90*mingw*)
83 AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system]) 91 AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
84 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system]) 92 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
85 LDFLAGS="$LDFLAGS -no-undefined -Wl,--export-all-symbols -lws2_32 -lplibc" 93 LDFLAGS="$LDFLAGS -no-undefined -Wl,--export-all-symbols -lws2_32 -lplibc"
94 AM_CONDITIONAL(HAVE_GNU_LD, true)
86 ;; 95 ;;
87*) 96*)
88 AC_MSG_RESULT(Unrecognised OS $host_os) 97 AC_MSG_RESULT(Unrecognised OS $host_os)
89 AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS]) 98 AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
99 AM_CONDITIONAL(HAVE_GNU_LD, false)
90;; 100;;
91esac 101esac
92 102
@@ -96,12 +106,6 @@ AC_SUBST(PTHREAD_LIBS)
96AC_SUBST(PTHREAD_LDFLAGS) 106AC_SUBST(PTHREAD_LDFLAGS)
97AC_SUBST(PTHREAD_CPPFLAGS) 107AC_SUBST(PTHREAD_CPPFLAGS)
98 108
99# pthread_t is a struct since 11/2004
100AC_CHECK_MEMBER(pthread_t.p, AC_DEFINE(HAVE_NEW_PTHREAD_T, 1,
101 [Define if you have a post 11/2004 pthread library]), , [#include <pthread.h>])
102
103AC_CHECK_FUNCS(pthread_equal)
104
105# Check for headers that are ALWAYS required 109# Check for headers that are ALWAYS required
106AC_CHECK_HEADERS([fcntl.h math.h errno.h limits.h stdio.h locale.h sys/stat.h sys/types.h pthread.h],,AC_MSG_ERROR([Compiling libmicrohttpd requires standard UNIX headers files])) 110AC_CHECK_HEADERS([fcntl.h math.h errno.h limits.h stdio.h locale.h sys/stat.h sys/types.h pthread.h],,AC_MSG_ERROR([Compiling libmicrohttpd requires standard UNIX headers files]))
107 111
@@ -117,6 +121,20 @@ LIBS=$SAVE_LIBS
117AC_SYS_LARGEFILE 121AC_SYS_LARGEFILE
118AC_FUNC_FSEEKO 122AC_FUNC_FSEEKO
119 123
124
125# optional: have error messages?
126AC_MSG_CHECKING(--enable-messages argument)
127AC_ARG_ENABLE(messages,
128 [ --enable-messages Enable MHD error messages],
129 [enable_messages=$enableval],
130 [enable_messages="no"])
131AC_MSG_RESULT($enable_messages)
132if test "$enable_messages" = "yes"
133then
134 AC_DEFINE([HAVE_MESSAGES],[1],[Include error messages])
135fi
136
137
120AC_SUBST(CPPFLAGS) 138AC_SUBST(CPPFLAGS)
121AC_SUBST(LIBS) 139AC_SUBST(LIBS)
122AC_SUBST(LDFLAGS) 140AC_SUBST(LDFLAGS)