aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2007-01-09 20:54:00 +0000
committerChristian Grothoff <christian@grothoff.org>2007-01-09 20:54:00 +0000
commit87903ed8f3bdcc8b26aa01e322548aba320132d0 (patch)
tree6e9a31b406d26898fd783c61a04925812e7fca3c
parentc282b3009db5bdf8b6d80ac1c482e805137ef856 (diff)
downloadlibmicrohttpd-87903ed8f3bdcc8b26aa01e322548aba320132d0.tar.gz
libmicrohttpd-87903ed8f3bdcc8b26aa01e322548aba320132d0.zip
build
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac117
-rw-r--r--doc/Makefile.am2
3 files changed, 120 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 00000000..5619ed9b
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1 @@
SUBDIRS = src doc .
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 00000000..429ba767
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,117 @@
1# This file is part of libmicrohttpd.
2# (C) 2006, 2007 Christian Grothoff (and other contributing authors)
3#
4# libmicrohttpd is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published
6# by the Free Software Foundation; either version 2, or (at your
7# option) any later version.
8#
9# libmicrohttpd is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12# General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with libmicrohttpd; see the file COPYING. If not, write to the
16# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17# Boston, MA 02111-1307, USA.
18#
19#
20# Process this file with autoconf to produce a configure script.
21#
22#
23AC_PREREQ(2.57)
24AC_INIT([libmicrohttpd], [0.0.0],[libmicrohttpd@cs.du.edu])
25AM_INIT_AUTOMAKE([libmicrohttpd], [0.0.0])
26AM_CONFIG_HEADER([config.h])
27
28AH_TOP([#define _GNU_SOURCE 1])
29
30# Checks for programs.
31AC_PROG_AWK
32AC_PROG_CC
33AC_PROG_CPP
34AC_PROG_INSTALL
35AC_PROG_LN_S
36AC_PROG_MAKE_SET
37AC_CANONICAL_HOST
38AM_PROG_LIBTOOL
39
40CFLAGS="-Wall -Werror $CFLAGS"
41# use '-fno-strict-aliasing', but only if the compiler can take it
42if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1;
43then
44 CFLAGS="-fno-strict-aliasing $CFLAGS"
45fi
46
47# Check system type
48case "$host_os" in
49*darwin* | *rhapsody* | *macosx*)
50 AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system])
51 CFLAGS="-no-cpp-precomp $CFLAGS"
52 LDFLAGS="-flat_namespace -undefined suppress $LDFLAGS"
53 ;;
54linux*)
55 AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
56 ;;
57freebsd*)
58 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
59 AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
60 CFLAGS="-D_THREAD_SAFE $CFLAGS"
61 ;;
62openbsd*)
63 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
64 AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
65 ;;
66netbsd*)
67 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
68 AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
69 ;;
70*solaris*)
71 AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
72 AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work])
73 ;;
74*arm-linux*)
75 AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
76 CFLAGS="-D_REENTRANT -fPIC -pipe $CFLAGS"
77 ;;
78*cygwin*)
79 AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
80 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
81 LDFLAGS="$LDFLAGS -no-undefined"
82 ;;
83*mingw*)
84 AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
85 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
86 LDFLAGS="$LDFLAGS -no-undefined -Wl,--export-all-symbols -lws2_32"
87 ;;
88*)
89 AC_MSG_RESULT(Unrecognised OS $host_os)
90 AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
91;;
92esac
93
94CHECK_PTHREAD
95AC_SUBST(PTHREAD_LIBS)
96AC_SUBST(PTHREAD_LDFLAGS)
97AC_SUBST(PTHREAD_CPPFLAGS)
98
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
103# large file support
104AC_SYS_LARGEFILE
105AC_FUNC_FSEEKO
106
107AC_SUBST(CPPFLAGS)
108AC_SUBST(LIBS)
109AC_SUBST(LDFLAGS)
110AC_SUBST(EXT_LIB_PATH)
111AC_SUBST(EXT_LIBS)
112
113AC_CONFIG_FILES([
114Makefile
115doc/Makefile
116src/Makefile])
117AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 00000000..a94090da
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,2 @@
1man_MANS = extract.1 libextractor.3
2EXTRA_DIST = $(man_MANS)