376
by Bernhard R. Link
Rename configure.in to configure.ac |
1 |
dnl
|
2 |
dnl Process this file with autoconf to produce a configure script |
|
3 |
dnl
|
|
4 |
||
388.5.154
by Bernhard R. Link
prepare 5.0.0 |
5 |
AC_INIT(reprepro, 5.0.0, brlink@debian.org) |
388.2.287
by Bernhard R. Link
increase version to 3.5.0, switch to 'new' AC_INIT and AM_INIT_AUTOMAKE syntax, move automaitcally included autoconf to ac/ subdir |
6 |
AC_CONFIG_SRCDIR(main.c) |
7 |
AC_CONFIG_AUX_DIR(ac) |
|
8 |
AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability]) |
|
376
by Bernhard R. Link
Rename configure.in to configure.ac |
9 |
AM_CONFIG_HEADER(config.h) |
10 |
||
388.4.207
by Bernhard R. Link
fix setting of default CFLAGS |
11 |
if test "${CFLAGS+set}" != set ; then |
388.5.154
by Bernhard R. Link
prepare 5.0.0 |
12 |
CFLAGS="-Wall -O2 -g -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wsign-compare -Wlogical-op" |
388.4.207
by Bernhard R. Link
fix setting of default CFLAGS |
13 |
fi
|
14 |
||
376
by Bernhard R. Link
Rename configure.in to configure.ac |
15 |
AM_MAINTAINER_MODE
|
388.2.8
by Bernhard R. Link
switch to AC_GNU_SOURCE instead of specifying my hand, add -std=gnu99 to CFLAGS to get C99 extensions even on etch |
16 |
AC_GNU_SOURCE
|
376
by Bernhard R. Link
Rename configure.in to configure.ac |
17 |
|
388.4.7
by Bernhard R. Link
use AC_PROG_CC_C99 |
18 |
AC_PROG_CC_C99
|
376
by Bernhard R. Link
Rename configure.in to configure.ac |
19 |
AC_PROG_INSTALL
|
388.1.224
by Bernhard R. Link
added AC_SYS_LARGEFILE |
20 |
AC_SYS_LARGEFILE
|
376
by Bernhard R. Link
Rename configure.in to configure.ac |
21 |
|
388.2.299
by Bernhard R. Link
use AC_C_BIGENDIAN instead of endian.h |
22 |
AC_C_BIGENDIAN() |
388.2.13
by Bernhard R. Link
move to C99's bool, false and true |
23 |
AC_HEADER_STDBOOL
|
388.4.213
by Bernhard R. Link
check where tree stuff is stored |
24 |
AC_CHECK_FUNCS([closefrom strndup dprintf tdestroy]) |
388.4.36
by Bernhard R. Link
add mode to rredtool to create .diff/ directories |
25 |
found_mktemp=no |
26 |
AC_CHECK_FUNCS([mkostemp mkstemp],[found_mktemp=yes ; break],) |
|
27 |
if test "$found_mktemp" = "no" ; then |
|
28 |
AC_MSG_ERROR([Missing mkstemp or mkostemp]) |
|
29 |
fi
|
|
388.2.108
by Bernhard R. Link
Try to be a bit more portable... |
30 |
AC_CHECK_FUNC([vasprintf],,[AC_MSG_ERROR([Could not find vasprintf implementation!])]) |
388.2.13
by Bernhard R. Link
move to C99's bool, false and true |
31 |
|
388.1.222
by Bernhard R. Link
add support for libdb-4.4 and libdb-4.3 |
32 |
DBLIBS="" |
388.1.234
by Bernhard R. Link
rework detection of libdb version available |
33 |
# the only way to find out which is compileable is to look into db.h:
|
34 |
||
388.1.222
by Bernhard R. Link
add support for libdb-4.4 and libdb-4.3 |
35 |
AC_CHECK_HEADER(db.h,,[AC_MSG_ERROR(["no db.h found"])]) |
388.4.14
by Bernhard R. Link
be extremly optimistic about lidb development... |
36 |
|
37 |
AC_CHECK_LIB(db, db_create, [DBLIBS="-ldb $DBLIBS" |
|
38 |
],[AC_MSG_ERROR(["no libdb found"])],[$DBLIBS]) |
|
388.1.222
by Bernhard R. Link
add support for libdb-4.4 and libdb-4.3 |
39 |
AC_SUBST([DBLIBS]) |
40 |
||
388.1.234
by Bernhard R. Link
rework detection of libdb version available |
41 |
AC_CHECK_LIB(z,gzopen,,[AC_MSG_ERROR(["no zlib found"])],) |
388.1.553
by Bernhard R. Link
Add support for building without libgpgme |
42 |
|
43 |
AC_ARG_WITH(libgpgme, |
|
388.4.55
by Bernhard R. Link
fix typo in --with-libgpgme option description |
44 |
[ --with-libgpgme=path|yes|no Give path to prefix libgpgme was installed with],[dnl |
388.1.553
by Bernhard R. Link
Add support for building without libgpgme |
45 |
case "$withval" in |
46 |
no) |
|
47 |
;;
|
|
48 |
yes) |
|
49 |
AC_CHECK_HEADER(gpgme.h,,[AC_MSG_ERROR(["no gpgme.h found"])]) |
|
50 |
AC_CHECK_LIB(gpg-error,gpg_strsource,,[AC_MSG_ERROR(["no libgpg-error found"])],) |
|
51 |
AC_CHECK_LIB(gpgme,gpgme_get_protocol_name,,[AC_MSG_ERROR(["no libgpgme found (need at least 0.4.1)"])],) |
|
52 |
;;
|
|
53 |
*) |
|
54 |
CPPFLAGS="$CPPFLAGS -I$withval/include" |
|
55 |
LIBS="$LIBS -L$withval/lib" |
|
56 |
AC_CHECK_HEADER(gpgme.h,,[AC_MSG_ERROR(["no gpgme.h found"])]) |
|
57 |
AC_CHECK_LIB(gpg-error,gpg_strsource,,[AC_MSG_ERROR(["no libgpg-error found"])],) |
|
58 |
AC_CHECK_LIB(gpgme,gpgme_get_protocol_name,,[AC_MSG_ERROR(["no libgpgme found (need at least 0.4.1)"])],) |
|
59 |
;;
|
|
60 |
esac
|
|
61 |
],[dnl default is to behave like yes (for libgpgme only) |
|
62 |
AC_CHECK_HEADER(gpgme.h,,[AC_MSG_ERROR(["no gpgme.h found (to disable run with --without-libgpgme)"])]) |
|
63 |
AC_CHECK_LIB(gpg-error,gpg_strsource,,[AC_MSG_ERROR(["no libgpg-error found (to disable run with --without-libgpgme)"])],) |
|
64 |
AC_CHECK_LIB(gpgme,gpgme_get_protocol_name,,[AC_MSG_ERROR(["did not find libgpgme versoion 0.4.1 or later (to disable run with --without-libgpgme)"])],) |
|
65 |
])
|
|
388.1.234
by Bernhard R. Link
rework detection of libdb version available |
66 |
|
388.1.217
by Bernhard R. Link
add --with-libbz2 and --without-libbz2 to make compiling without an error or to force compiling without |
67 |
AC_ARG_WITH(libbz2, |
68 |
[ --with-libbz2=path|yes|no Give path to prefix libbz2 was installed with],[dnl |
|
69 |
case "$withval" in |
|
70 |
no) |
|
71 |
;;
|
|
72 |
yes) |
|
73 |
AC_CHECK_LIB(bz2,BZ2_bzCompressInit,,[AC_MSG_ERROR(["no libbz2 found, despite being told to use it"])],) |
|
74 |
;;
|
|
75 |
*) |
|
76 |
AC_CHECK_LIB(bz2,BZ2_bzCompressInit,[dnl |
|
77 |
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIBBZ2)) |
|
78 |
LIBS="$LIBS -L$withval/lib -lbz2" |
|
79 |
CPPFLAGS="$CPPFLAGS -I$withval/include" |
|
80 |
],[AC_MSG_ERROR(["no libbz2 found, despite being told to use it"])],[-L$withval/lib]) |
|
81 |
;;
|
|
82 |
esac
|
|
83 |
],[dnl without --with-libbz2 we look for it but not finding it is no error: |
|
84 |
AC_CHECK_LIB(bz2,BZ2_bzCompressInit,,[AC_MSG_WARN(["no libbz2 found, compiling without"])],) |
|
85 |
])
|
|
86 |
||
388.5.81
by Bernhard R. Link
some start of .xz generation support (using liblzma) |
87 |
AC_ARG_WITH(liblzma, |
88 |
[ --with-liblzma=path|yes|no Give path to prefix liblzma was installed with],[dnl |
|
89 |
case "$withval" in |
|
90 |
no) |
|
91 |
;;
|
|
92 |
yes) |
|
93 |
AC_CHECK_LIB(lzma,lzma_easy_encoder,,[AC_MSG_ERROR(["no liblzma found, despite being told to use it"])],) |
|
94 |
;;
|
|
95 |
*) |
|
96 |
AC_CHECK_LIB(lzma,lzma_easy_encoder,[dnl |
|
97 |
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIBLZMA)) |
|
98 |
LIBS="$LIBS -L$withval/lib -llzma" |
|
99 |
CPPFLAGS="$CPPFLAGS -I$withval/include" |
|
100 |
],[AC_MSG_ERROR(["no liblzma found, despite being told to use it"])],[-L$withval/lib]) |
|
101 |
;;
|
|
102 |
esac
|
|
388.5.93
by Bernhard R. Link
fix compiling without lzma and make that the default even if liblzma is available |
103 |
],[
|
388.5.113
by Bernhard R. Link
add support for builtin uncompression of .lzma and .xz using liblzma |
104 |
AC_CHECK_LIB(lzma,lzma_easy_encoder,,[AC_MSG_WARN(["no liblzma found, compiling without"])],) |
388.5.81
by Bernhard R. Link
some start of .xz generation support (using liblzma) |
105 |
])
|
106 |
||
388.1.214
by Bernhard R. Link
Adding libarchive support |
107 |
ARCHIVELIBS="" |
108 |
ARCHIVECPP="" |
|
109 |
AH_TEMPLATE([HAVE_LIBARCHIVE],[Defined if libarchive is available]) |
|
110 |
AC_ARG_WITH(libarchive, |
|
111 |
[ --with-libarchive=path|yes|no Give path to prefix libarchive was installed with],[dnl |
|
112 |
case "$withval" in |
|
113 |
no) |
|
114 |
;;
|
|
115 |
yes) |
|
116 |
AC_CHECK_LIB(archive,archive_read_new,[dnl |
|
117 |
AC_CHECK_HEADER(archive.h,[dnl |
|
388.1.222
by Bernhard R. Link
add support for libdb-4.4 and libdb-4.3 |
118 |
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIBARCHIVE),1) |
388.1.214
by Bernhard R. Link
Adding libarchive support |
119 |
ARCHIVELIBS="-larchive" |
120 |
],[AC_MSG_ERROR([Could not find archive.h])]) |
|
121 |
],[AC_MSG_ERROR([Could not find libarchive])]) |
|
122 |
;;
|
|
123 |
*) |
|
124 |
AC_CHECK_LIB(archive,archive_read_new,[dnl |
|
125 |
mysave_CPPFLAGS="$CPPFLAGS" |
|
126 |
CPPFLAGS="-I$withval/include $CPPFLAGS" |
|
127 |
AC_CHECK_HEADER(archive.h,[dnl |
|
388.1.222
by Bernhard R. Link
add support for libdb-4.4 and libdb-4.3 |
128 |
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIBARCHIVE),1) |
388.1.214
by Bernhard R. Link
Adding libarchive support |
129 |
ARCHIVELIBS="-L$withval/lib -larchive" |
130 |
ARCHIVECPP="-I$withval/include" |
|
131 |
],[AC_MSG_ERROR([Could not find archive.h])]) |
|
132 |
CPPFLAGS="$mysave_CPPFLAGS" |
|
133 |
],[AC_MSG_ERROR([Could not find libarchive])],[-L$withval/lib]) |
|
134 |
;;
|
|
135 |
esac
|
|
136 |
],[dnl without --with-libarchive we look for it but not finding it is no error: |
|
137 |
AC_CHECK_LIB(archive,archive_read_new,[dnl |
|
138 |
AC_CHECK_HEADER(archive.h,[dnl |
|
388.1.222
by Bernhard R. Link
add support for libdb-4.4 and libdb-4.3 |
139 |
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIBARCHIVE),1) |
388.1.214
by Bernhard R. Link
Adding libarchive support |
140 |
ARCHIVELIBS="-larchive" |
388.1.216
by Bernhard R. Link
add hackish --with-static-libarchive option |
141 |
],)
|
142 |
],)
|
|
143 |
])
|
|
144 |
AC_ARG_WITH(static-libarchive, |
|
145 |
[ --with-static-libarchive=.a-file static libarchive library to be linked against], |
|
146 |
[ case "$withval" in |
|
147 |
no|yes) AC_MSG_ERROR([--with-static-libarchive needs an .a file as parameter]) |
|
148 |
;;
|
|
149 |
*) |
|
150 |
AC_CHECK_LIB(c,archive_read_new,[dnl |
|
151 |
mysave_CPPFLAGS="$CPPFLAGS" |
|
152 |
CPPFLAGS="$ARCHIVECPP $CPPFLAGS" |
|
153 |
AC_CHECK_HEADER(archive.h,[dnl |
|
154 |
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIBARCHIVE)) |
|
155 |
ARCHIVELIBS="$withval" |
|
156 |
],[AC_MSG_ERROR([Could not find archive.h])]) |
|
157 |
CPPFLAGS="$mysave_CPPFLAGS" |
|
158 |
],[AC_MSG_ERROR([Error linking against $withval])],[$withval]) |
|
159 |
esac
|
|
388.1.214
by Bernhard R. Link
Adding libarchive support |
160 |
])
|
161 |
AM_CONDITIONAL([HAVE_LIBARCHIVE],[test -n "$ARCHIVELIBS"]) |
|
162 |
AC_SUBST([ARCHIVELIBS]) |
|
163 |
AC_SUBST([ARCHIVECPP]) |
|
376
by Bernhard R. Link
Rename configure.in to configure.ac |
164 |
|
165 |
dnl
|
|
166 |
dnl Create makefiles |
|
167 |
dnl
|
|
168 |
||
388.4.8
by Bernhard R. Link
use AC_CONFIG_FILES |
169 |
AC_CONFIG_FILES([Makefile docs/Makefile tests/Makefile]) |
170 |
AC_OUTPUT
|