diff options
author | Christian Grothoff <christian@grothoff.org> | 2007-01-09 20:54:00 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2007-01-09 20:54:00 +0000 |
commit | 87903ed8f3bdcc8b26aa01e322548aba320132d0 (patch) | |
tree | 6e9a31b406d26898fd783c61a04925812e7fca3c | |
parent | c282b3009db5bdf8b6d80ac1c482e805137ef856 (diff) | |
download | libmicrohttpd-87903ed8f3bdcc8b26aa01e322548aba320132d0.tar.gz libmicrohttpd-87903ed8f3bdcc8b26aa01e322548aba320132d0.zip |
build
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | configure.ac | 117 | ||||
-rw-r--r-- | doc/Makefile.am | 2 |
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 | # | ||
23 | AC_PREREQ(2.57) | ||
24 | AC_INIT([libmicrohttpd], [0.0.0],[libmicrohttpd@cs.du.edu]) | ||
25 | AM_INIT_AUTOMAKE([libmicrohttpd], [0.0.0]) | ||
26 | AM_CONFIG_HEADER([config.h]) | ||
27 | |||
28 | AH_TOP([#define _GNU_SOURCE 1]) | ||
29 | |||
30 | # Checks for programs. | ||
31 | AC_PROG_AWK | ||
32 | AC_PROG_CC | ||
33 | AC_PROG_CPP | ||
34 | AC_PROG_INSTALL | ||
35 | AC_PROG_LN_S | ||
36 | AC_PROG_MAKE_SET | ||
37 | AC_CANONICAL_HOST | ||
38 | AM_PROG_LIBTOOL | ||
39 | |||
40 | CFLAGS="-Wall -Werror $CFLAGS" | ||
41 | # use '-fno-strict-aliasing', but only if the compiler can take it | ||
42 | if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1; | ||
43 | then | ||
44 | CFLAGS="-fno-strict-aliasing $CFLAGS" | ||
45 | fi | ||
46 | |||
47 | # Check system type | ||
48 | case "$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 | ;; | ||
54 | linux*) | ||
55 | AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system]) | ||
56 | ;; | ||
57 | freebsd*) | ||
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 | ;; | ||
62 | openbsd*) | ||
63 | AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system]) | ||
64 | AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system]) | ||
65 | ;; | ||
66 | netbsd*) | ||
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 | ;; | ||
92 | esac | ||
93 | |||
94 | CHECK_PTHREAD | ||
95 | AC_SUBST(PTHREAD_LIBS) | ||
96 | AC_SUBST(PTHREAD_LDFLAGS) | ||
97 | AC_SUBST(PTHREAD_CPPFLAGS) | ||
98 | |||
99 | # pthread_t is a struct since 11/2004 | ||
100 | AC_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 | ||
104 | AC_SYS_LARGEFILE | ||
105 | AC_FUNC_FSEEKO | ||
106 | |||
107 | AC_SUBST(CPPFLAGS) | ||
108 | AC_SUBST(LIBS) | ||
109 | AC_SUBST(LDFLAGS) | ||
110 | AC_SUBST(EXT_LIB_PATH) | ||
111 | AC_SUBST(EXT_LIBS) | ||
112 | |||
113 | AC_CONFIG_FILES([ | ||
114 | Makefile | ||
115 | doc/Makefile | ||
116 | src/Makefile]) | ||
117 | AC_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 @@ | |||
1 | man_MANS = extract.1 libextractor.3 | ||
2 | EXTRA_DIST = $(man_MANS) | ||