Remove support for sqlite based rpm database
[platform/upstream/rpm.git] / configure.ac
1 AC_PREREQ(2.61)
2 AC_INIT(rpm, 4.8.0-beta1, rpm-maint@lists.rpm.org)
3
4 AC_CONFIG_SRCDIR([rpmqv.c])
5 AC_CONFIG_HEADERS([config.h])
6 AC_CONFIG_MACRO_DIR([m4])
7
8 AM_INIT_AUTOMAKE([1.10 foreign tar-ustar dist-bzip2 subdir-objects nostdinc])
9
10 AC_CONFIG_TESTDIR(tests)
11
12 AC_USE_SYSTEM_EXTENSIONS
13
14 AC_DISABLE_STATIC
15
16 dnl Checks for programs.
17 AC_PROG_CXX
18 AC_PROG_AWK
19 AC_PROG_CC
20 AC_PROG_CPP
21 AC_PROG_INSTALL
22 AC_PROG_LN_S
23 AC_PROG_MAKE_SET
24 AC_PROG_LIBTOOL
25 AC_PROG_YACC
26
27 AC_SUBST(__CC, $CC)
28 AC_PROG_CC_C99
29 if test "$ac_cv_prog_cc_c99" = no; then
30     AC_MSG_ERROR([ISO C99 capable compiler required])
31 fi
32
33 AS=${AS-as}
34 AC_SUBST(AS)
35 if test "$GCC" = yes; then
36     CFLAGS="$CFLAGS -fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wno-char-subscripts"
37     # XXX disabled for now due to noise from NSPR headers
38     # CFLAGS="$CFLAGS -Wstrict-prototypes"
39     cflags_to_try="-fno-strict-aliasing -fstack-protector -Wempty-body"
40     AC_MSG_CHECKING([supported compiler flags])
41     old_cflags=$CFLAGS
42     echo
43     for flag in $cflags_to_try; do
44         CFLAGS="$CFLAGS $flag"
45         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[
46                 echo "   $flag"
47                 RPMCFLAGS="$RPMCFLAGS $flag"
48         ],[])
49         CFLAGS=$old_cflags
50     done
51     CFLAGS="$CFLAGS $RPMCFLAGS"
52 fi
53 export CFLAGS
54
55 AC_SYS_LARGEFILE
56
57 dnl
58 dnl look for POSIX chmod attributes
59 dnl
60 AC_MSG_CHECKING(POSIX chmod)
61 touch foo.chmodtest
62 chmod 744 foo.chmodtest
63 chmod +X foo.chmodtest 2>/dev/null
64 a=`ls -l foo.chmodtest | awk '{print substr($1,1,10)}'`
65 rm -f foo.chmodtest
66 if test "$a" = "-rwxr-xr-x"; then
67     AC_MSG_RESULT(yes)
68     FIXPERMS=a+rX,u+w,g-w,o-w 
69 else
70     AC_MSG_RESULT(no (tell your OS vendor about GNU fileutils))
71     FIXPERMS=a+r,u+w,g-w,o-w 
72 fi
73 AC_SUBST(FIXPERMS)
74
75 dnl
76 dnl see if we have a mkdir that supports `-p'.
77 dnl
78 AC_PATH_PROGS(RPM_MKDIR, mkdir, mkdir)
79 AC_MSG_CHECKING(if $RPM_MKDIR supports -p)
80 rm -rf conftest
81 $RPM_MKDIR -p conftest/a 2>/dev/null
82 if test $? = 0 ; then
83         rmdir conftest/a 2>/dev/null
84         if test $? = 0  ; then
85                 :
86         else
87                 RPM_MKDIR_P=0
88         fi
89
90         rmdir conftest 2>/dev/null
91         if test $? = 0 ; then
92                 RPM_MKDIR_P="$RPM_MKDIR -p"
93         else
94                 RPM_MKDIR_P=0
95         fi
96 else
97         RPM_MKDIR_P=0
98 fi
99
100 if test X"$RPM_MKDIR_P" = X0 ; then
101         AC_MSG_RESULT(no)
102         RPM_MKDIR_P="`echo ${prefix}/lib/rpm/mkinstalldirs`"
103 else
104         AC_MSG_RESULT(yes)
105 fi
106 dnl
107 dnl substitute this into config.h, so the C source picks it up.
108 dnl
109 AC_DEFINE_UNQUOTED(RPM_MKDIR_P, "${RPM_MKDIR_P}",
110 [A full path to a program, possibly with arguments, that will create a
111    directory and all necessary parent directories, ala 'mkdir -p'])
112 AC_SUBST(RPM_MKDIR_P)
113
114 dnl AM_DISABLE_SHARED
115 AM_PROG_LIBTOOL
116
117 AC_CHECK_TOOL(AR, ar, :)
118
119 dnl
120 dnl use defaults if cross-compiling, otherwise use the default path.
121 dnl
122 if test "$cross_compiling" = "yes"; then
123     MYPATH=":"
124 else
125     MYPATH=$PATH
126 fi
127
128 dnl
129 dnl Find some common programs
130 dnl
131 AC_PATH_PROG(__BZIP2, bzip2, /usr/bin/bzip2, $MYPATH)
132 AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH)
133 AC_PATH_PROG(__CHGRP, chgrp, /bin/chgrp, $MYPATH)
134 AC_PATH_PROG(__CHMOD, chmod, /bin/chmod, $MYPATH)
135 AC_PATH_PROG(__CHOWN, chown, /bin/chown, $MYPATH)
136 AC_PATH_PROG(__CP, cp, /bin/cp, $MYPATH)
137 AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH)
138 AC_PATH_PROG(__CURL, curl, /usr/bin/curl, $MYPATH)
139 AC_PATH_PROG(__FILE, file, /usr/bin/file, $MYPATH)
140 AC_PATH_PROG(__GPG, gpg, /usr/bin/gpg, $MYPATH)
141 AC_PATH_PROG(__GREP, grep, /bin/grep, $MYPATH)
142 AC_PATH_PROG(__GZIP, gzip, /bin/gzip, $MYPATH)
143 AC_PATH_PROG(__UNZIP, unzip, /usr/bin/unzip, $MYPATH)
144
145 AC_PATH_PROG(__ID, id, /usr/bin/id, $MYPATH)
146 AC_MSG_CHECKING(checking whether id supports -u)
147     if ${__ID} -u 2>&1 > /dev/null ; then
148         __ID_U="%{__id} -u"
149         AC_MSG_RESULT(yes)
150     else
151         __ID_U="%{__id} | %{__sed} 's/[[^=]]*=\\\\([[0-9]][[0-9]]*\\\\).*$/\\\\1/'"
152         AC_MSG_RESULT(no)
153     fi
154 AC_SUBST(__ID_U)
155
156 AC_PATH_PROG(__INSTALL, install, /usr/bin/install, $MYPATH)
157 AC_PATH_PROG(__XZ, xz, /usr/bin/xz, $MYPATH)
158 AC_PATH_PROG(__MAKE, make, /usr/bin/make, $MYPATH)
159 AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH)
160 AC_PATH_PROG(__MV, mv, /bin/mv, $MYPATH)
161 AC_PATH_PROG(__PATCH, patch, /usr/bin/patch, $MYPATH)
162 AC_MSG_CHECKING(old version of patch)
163     PATCHVERSION=`patch --version 2>&1`
164
165     if test "$PATCHVERSION" = "Patch version 2.1"; then
166         AC_DEFINE(HAVE_OLDPATCH_21, 1,
167                 [Define if the patch call you'll be using is 2.1 or older])
168         AC_MSG_RESULT(patch older then 2.2 found)
169     else
170         AC_MSG_RESULT(patch later then 2.2 found)
171     fi
172
173 AC_PATH_PROG(__PERL, perl, /usr/bin/perl, $MYPATH)
174 AC_PATH_PROG(__PGP, pgp, /usr/bin/pgp, $MYPATH)
175 AC_PATH_PROG(__PYTHON, python, /usr/bin/python, $MYPATH) 
176 AC_PATH_PROG(__RM, rm, /bin/rm, $MYPATH)
177 AC_PATH_PROG(__RSH, rsh, /usr/bin/rsh, $MYPATH)
178 AC_PATH_PROG(__SED, sed, /bin/sed, $MYPATH)
179 AC_PATH_PROG(__SSH, ssh, /usr/bin/ssh, $MYPATH)
180 AC_PATH_PROG(__TAR, tar, /bin/tar, $MYPATH)
181
182 AC_PATH_PROG(__LD, ld, /usr/bin/ld, $MYPATH)
183 AC_PATH_PROG(__NM, nm, /usr/bin/nm, $MYPATH)
184 AC_PATH_PROG(__OBJCOPY, objcopy, /usr/bin/objcopy, $MYPATH)
185 AC_PATH_PROG(__OBJDUMP, objdump, /usr/bin/objdump, $MYPATH)
186 AC_PATH_PROG(__STRIP, strip, /usr/bin/strip, $MYPATH)
187 AC_PATH_PROG(__FAKECHROOT, fakechroot, /usr/bin/fakechroot, $MYPATH)
188
189 #=================
190 # Check for zlib library. 
191
192 WITH_ZLIB_INCLUDE=
193 WITH_ZLIB_LIB=
194
195 AC_CHECK_HEADERS([zlib.h],[
196   AS_IF([test -z "${WITH_ZLIB_LIB}"],[
197     for zlib in z gz ; do
198       AC_CHECK_LIB(${zlib}, gzread, 
199         [WITH_ZLIB_LIB="-l${zlib}"; break])
200     done
201
202 dnl zlib-1.0.4 has not gzseek
203     AC_CHECK_LIB(${zlib}, gzseek, [AC_DEFINE(HAVE_GZSEEK, 1, [Define as 1 if your zlib has gzseek()])])
204   ])
205 ])
206
207 AC_SUBST(WITH_ZLIB_INCLUDE)
208 AC_SUBST(WITH_ZLIB_LIB)
209
210 #=================
211 # Check for bzip2 library.
212
213 AC_CHECK_HEADERS([bzlib.h],[
214   AC_CHECK_LIB(bz2, bzread, [WITH_BZ2_LIB=-lbz2],
215   [
216     AC_CHECK_LIB(bz2, BZ2_bzread,[ 
217       WITH_BZ2_LIB="-lbz2"
218       AC_DEFINE(HAVE_BZ2_1_0, 1, [Define as 1 if you bzip2 1.0])
219     ]) 
220   ])
221 ])
222 AC_SUBST(WITH_BZ2_LIB)
223
224 #=================
225 # Check for lzma library.
226
227 AC_CHECK_HEADERS([lzma.h],[
228   AC_CHECK_LIB(lzma, lzma_easy_encoder, [WITH_LZMA_LIB=-llzma])
229 ])
230 AC_SUBST(WITH_LZMA_LIB)
231
232 #=================
233
234 dnl
235 dnl Check for features
236 dnl
237
238 dnl Checks for libraries.
239
240 AC_CHECK_FUNC(setreuid, [], [
241     AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi])
242 ])
243
244 AC_CHECK_FUNC(rand, [], [
245     AC_CHECK_LIB(rand, rand, [])
246 ])
247
248 AC_CHECK_FUNC(getdomainname, [], [
249     AC_CHECK_LIB(nsl, getdomainname)
250 ])
251 AC_CHECK_FUNC(socket, [], [
252     AC_CHECK_LIB(socket, socket)
253 ])
254
255 AC_CHECK_HEADERS(error.h)
256 AC_CHECK_FUNCS(error)
257
258 AC_CHECK_HEADERS(poll.h)
259
260 AC_CHECK_HEADERS(pthread.h)
261
262 AC_CHECK_LIB(pthread, pthread_mutex_trylock, [], [
263   dnl OSF 5.0 has the the symbols prefixed with __ in libpthread.
264   AC_CHECK_LIB(pthread, __pthread_mutex_trylock, [], [
265     AC_CHECK_LIB(thread, mutex_lock)
266   ])
267 ])
268
269 AC_SEARCH_LIBS(aio_read, [c rt aio posix4])
270
271 AC_CHECK_FUNCS(vsnprintf snprintf)
272
273 dnl Temporary hack for MiNT.  Some functions (writev, snprintf) are
274 dnl not in the libc but in libport (for political reasons).  This check
275 dnl can hopefully be removed soon.  Please use the default action
276 dnl for this macro (not LIBS=...), otherwise the check for dbopen
277 dnl will fail.
278 AC_CHECK_LIB(port, writev)
279
280 #=================
281 # Check for libelf library. Prefer external, otherwise none.
282 WITH_LIBELF_INCLUDE=
283 WITH_LIBELF_LIB=
284 AC_CHECK_HEADER([libelf.h])
285 AC_CHECK_HEADERS([gelf.h], [
286         AC_CHECK_LIB(elf, gelf_getvernaux, [
287             AC_DEFINE(HAVE_LIBELF, 1, [Define to 1 if you have the 'elf' library (-lelf).])
288             WITH_LIBELF_LIB="-lelf"
289             WITH_LIBELF=yes
290         ])
291 ])
292 AC_SUBST(WITH_LIBELF_INCLUDE)
293 AC_SUBST(WITH_LIBELF_LIB)
294 AM_CONDITIONAL(LIBELF,[test "$WITH_LIBELF" = yes])
295
296 AC_CHECK_HEADERS([dwarf.h], [
297   WITH_LIBDWARF=yes
298 ])
299 AM_CONDITIONAL(LIBDWARF,[test "$WITH_LIBDWARF" = yes])
300
301 #=================
302 # Check for NSS library.
303 # We need nss.h from NSS which needs nspr.h. Unfortunately both glibc and NSS 
304 # have a header named nss.h... so make extra check for NSS's sechash.h 
305 # which we use too and hopefully is slightly more unique to NSS.
306 WITH_NSS_INCLUDE=
307 WITH_NSS_LIB=
308 AC_CHECK_HEADERS([nspr.h nss.h sechash.h], [], [
309   AC_MSG_ERROR([missing required NSPR / NSS header])
310 ])
311 AC_CHECK_LIB(nss3, NSS_NoDB_Init, [
312   WITH_NSS_LIB=-lnss3
313 ], [
314   AC_MSG_ERROR([missing required NSS library 'nss3'])
315 ])
316 AC_SUBST(WITH_NSS_INCLUDE)
317 AC_SUBST(WITH_NSS_LIB)
318
319 #=================
320 # Check for magic library.
321 WITH_MAGIC_INCLUDE=
322 WITH_MAGIC_LIB=
323
324 AC_CHECK_HEADER([magic.h], [
325     AC_CHECK_LIB(magic, magic_open, [
326       WITH_MAGIC_INCLUDE=
327       WITH_MAGIC_LIB="-lmagic"
328     ],[
329       AC_MSG_ERROR([missing required library 'libmagic']) 
330     ])
331 ],[
332       AC_MSG_ERROR([missing required header magic.h]) 
333 ])
334
335 AC_SUBST(WITH_MAGIC_INCLUDE)
336 AC_SUBST(WITH_MAGIC_LIB)
337
338 #=================
339 # Check for popt library.
340 WITH_POPT_INCLUDE=
341 WITH_POPT_LIB=
342
343 AC_CHECK_HEADER([popt.h], [
344   AC_CHECK_LIB(popt, poptGetContext, [
345       WITH_POPT_INCLUDE=
346       WITH_POPT_LIB="-lpopt"
347   ],[
348     AC_MSG_ERROR([missing required library popt])
349   ])
350 ],[
351   AC_MSG_ERROR([missing required header popt.h])
352 ])
353
354 AC_SUBST(WITH_POPT_INCLUDE)
355 AC_SUBST(WITH_POPT_LIB)
356
357 #=================
358 # Process --with/without-external-db
359 AC_ARG_WITH(external_db, [AS_HELP_STRING([--with-external-db],[build against an external Berkeley db])],
360 [case "$with_external_db" in
361 yes|no) ;;
362 *) AC_MSG_ERROR([invalid argument to --with-external-db]) ;;
363 esac],
364 [with_external_db=no])
365
366 case "$with_external_db" in
367 yes )
368   AC_CHECK_HEADERS([db.h],[
369     AC_CHECK_TYPE([db_threadid_t],[],
370       [AC_MSG_WARN([missing type db_threadid_t])],
371       [#include <db.h>])
372     save_LIBS="$LIBS"
373     AC_CHECK_LIB([db],[db_create],[],[
374       AC_MSG_ERROR([missing db_create in libdb])
375       ])
376     AC_CHECK_LIB([db],[db_env_create],[],[
377       AC_MSG_ERROR([missing db_env_create in libdb])
378       ])
379     AC_CHECK_LIB([db],[db_env_set_func_fsync],[],[
380       AC_MSG_ERROR([missing db_env_set_func_fsync in libdb])
381       ])
382     AC_CHECK_LIB([db],[db_strerror],[],[
383       AC_MSG_ERROR([missing db_strerror in libdb])
384       ])
385     WITH_DB_LIB=-ldb
386     LIBS="$save_LIBS"
387   ],[
388     AC_MSG_ERROR([missing required header db.h])
389   ])
390   ;;
391 * ) # Fall back to internal db if available
392   if [ test -x db/dist/configure ]; then
393     AC_DEFINE(HAVE_DB_H, 1, [Define if you have the <db3/db.h> header file])
394   else
395     AC_MSG_ERROR([internal Berkeley DB directory not present, see INSTALL])
396   fi
397   ;;
398 esac
399
400 AC_SUBST([WITH_DB_LIB])
401
402 dnl AmigaOS and IXEmul have a fork() dummy
403   case "$host" in
404     m68k-*-amigaos ) 
405         echo "Building for AmigaOS: using vfork() instead of fork()"; 
406         CFLAGS="$CFLAGS -Dfork=vfork" 
407         ;;
408   esac
409
410 AM_GNU_GETTEXT_VERSION([0.16.1])
411 AM_GNU_GETTEXT([external])
412
413 dnl Checks for header files we can live without.
414 AC_HEADER_STDC
415 AC_HEADER_MAJOR
416 AC_HEADER_DIRENT
417 AC_HEADER_TIME
418
419 AC_CHECK_HEADERS(locale.h)
420 AC_CHECK_HEADERS(limits.h)
421 AC_CHECK_HEADERS(fcntl.h getopt.h grp.h memory.h netdb.h pwd.h utime.h)
422
423 AC_CHECK_HEADERS(sys/ipc.h sys/socket.h sys/select.h)
424 AC_CHECK_HEADERS(sys/types.h sys/stdtypes.h)
425 AC_CHECK_HEADERS(sys/mman.h sys/resource.h sys/utsname.h sys/wait.h)
426
427 AC_CHECK_HEADERS(netinet/in_systm.h)
428 AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/systemcfg.h)
429 AC_CHECK_HEADERS(sys/mount.h sys/mntctl.h sys/param.h sys/vmount.h)
430 AC_CHECK_HEADERS(libio.h)
431 AC_CHECK_HEADERS(err.h mcheck.h)
432
433 AC_CHECK_HEADERS(glob.h)
434
435 dnl statfs portability fiddles.
436 dnl
437 dnl We should really emulate/steal sections of the statfs and struct statfs
438 dnl checks from GNU fileutils.
439 dnl
440 AC_MSG_CHECKING(for struct statfs)
441
442 dnl
443 dnl this is easier than nesting AC_TRY_COMPILEs...
444 dnl
445 found_struct_statfs=no
446
447 if test X$found_struct_statfs = Xno ; then
448 dnl Solaris 2.6+ wants to use statvfs
449 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
450 #ifdef HAVE_SYS_TYPES_H
451 #include <sys/types.h>
452 #endif
453 #include <sys/statvfs.h> ]], [[struct statvfs sfs;]])],[AC_MSG_RESULT(in sys/statvfs.h)
454         AC_DEFINE(STATFS_IN_SYS_STATVFS, 1,
455                 [statfs in <sys/statvfs.h> (for solaris 2.6+ systems)])
456         found_struct_statfs=yes],[])
457 fi
458
459 if test X$found_struct_statfs = Xno ; then
460 dnl first try including sys/vfs.h
461 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
462 #ifdef HAVE_SYS_TYPES_H
463 #include <sys/types.h>
464 #endif
465 #include <sys/vfs.h> ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/vfs.h)
466         AC_DEFINE(STATFS_IN_SYS_VFS, 1, [statfs in <sys/vfs.h> (for linux systems)])
467         found_struct_statfs=yes],[])
468 fi
469
470 if test X$found_struct_statfs = Xno ; then
471 dnl ...next try including sys/mount.h
472 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
473 #ifdef HAVE_SYS_TYPES_H
474 #include <sys/types.h>
475 #endif
476 #ifdef HAVE_SYS_PARAM_H
477 #include <sys/param.h>
478 #endif
479 #include <sys/mount.h> ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/mount.h)
480         AC_DEFINE(STATFS_IN_SYS_MOUNT, 1, [statfs in <sys/mount.h> (for Digital Unix 4.0D systems)])
481         found_struct_statfs=yes],[])
482 fi
483
484 if test X$found_struct_statfs = Xno ; then
485 dnl ...still no joy.  Try sys/statfs.h
486 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
487 #ifdef HAVE_SYS_TYPES_H
488 #include <sys/types.h>
489 #endif
490 #include <sys/statfs.h> ]], [[struct statfs sfs;]])],[AC_MSG_RESULT(in sys/statfs.h)
491         AC_DEFINE(STATFS_IN_SYS_STATFS, 1, [statfs in <sys/statfs.h> (for Irix 6.4 systems)])
492         found_struct_statfs=yes],[])
493 fi
494
495 if test X$found_struct_statfs = Xno ; then
496 dnl ...no luck.  Warn the user of impending doom.
497 AC_MSG_WARN(not found)
498 fi
499
500 dnl
501 dnl if we found the struct, see if it has the f_bavail member.  Some OSes
502 dnl don't, including IRIX 6.5+
503 dnl
504 if test X$found_struct_statfs = Xyes ; then
505 AC_MSG_CHECKING(for f_bavail member in struct statfs)
506 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
507 #ifdef HAVE_SYS_TYPES_H
508 #include <sys/types.h>
509 #endif
510 #if STATFS_IN_SYS_STATVFS
511 # include <sys/statvfs.h>
512   typedef struct statvfs STATFS_t;
513 #else
514   typedef struct statfs STATFS_t;
515 # if STATFS_IN_SYS_VFS
516 #  include <sys/vfs.h>
517 # elif STATFS_IN_SYS_MOUNT
518 #  include <sys/mount.h>
519 # elif STATFS_IN_SYS_STATFS
520 #  include <sys/statfs.h>
521 # endif
522 #endif ]], [[STATFS_t sfs;
523         sfs.f_bavail = 0;]])],[AC_MSG_RESULT(yes)
524         AC_DEFINE(STATFS_HAS_F_BAVAIL, 1, [Define if struct statfs has the f_bavail member])],[AC_MSG_RESULT(no)
525 ])
526 fi
527
528 if test X$found_struct_statfs = Xyes ; then
529 dnl
530 dnl now check to see if we have the 4-argument variant of statfs()
531 dnl this pretty much requires AC_RUN_IFELSE([AC_LANG_SOURCE([[]])],[],[],[])
532 dnl
533 AC_MSG_CHECKING([if statfs() requires 4 arguments])
534 AC_RUN_IFELSE([AC_LANG_SOURCE([[
535 #ifdef HAVE_SYS_TYPES_H
536 #include <sys/types.h>
537 #endif
538 #ifdef STATFS_IN_SYS_VFS
539 #include <sys/vfs.h>
540 #elif STATFS_IN_SYS_MOUNT
541 #include <sys/mouht.h>
542 #elif STATFS_IN_SYS_STATFS
543 #include <sys/statfs.h>
544 #endif
545 main() {
546         struct statfs sfs;
547         exit (statfs(".", &sfs, sizeof(sfs), 0));
548 }
549 ]])],[AC_MSG_RESULT(yes)
550         AC_DEFINE(STAT_STATFS4, 1, [Define if the statfs() call takes 4 arguments])],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)
551 ])
552 fi
553
554 AC_C_INLINE
555
556 dnl look for libc features
557 PROVIDES_ERRNO=no
558 AC_MSG_CHECKING(if <netdb.h> defines h_errno)
559 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[printf("%d",h_errno)]])],[PROVIDES_ERRNO=yes],[])
560 AC_MSG_RESULT($PROVIDES_ERRNO)
561 if test $PROVIDES_ERRNO = yes; then
562         AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno])
563 fi
564
565 dnl If a system doesn't have S_IFSOCK, define it as 0 which will
566 dnl make S_ISSOCK always return false (nice, eh?)
567 AC_MSG_CHECKING(if <sys/stat.h> defines S_IFSOCK)
568 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_IFSOCK)]])],[HAS_S_IFSOCK=yes],[HAS_S_IFSOCK=no])
569 AC_MSG_RESULT($HAS_S_IFSOCK)
570 if test $HAS_S_IFSOCK = yes; then
571         AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK])
572 fi
573
574 dnl Some Unix's are missing S_ISLNK, S_ISSOCK
575 AC_MSG_CHECKING(if <sys/stat.h> defines S_ISLNK)
576 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISLNK(0755))]])],[HAS_S_ISLNK=yes],[HAS_S_ISLNK=no])
577 AC_MSG_RESULT($HAS_S_ISLNK)
578 if test $HAS_S_ISLNK = yes; then
579         AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK])
580 fi
581
582 AC_MSG_CHECKING(if <sys/stat.h> defines S_ISSOCK)
583 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISSOCK(0755))]])],[HAS_S_ISSOCK=yes],[HAS_S_ISSOCK=no])
584 AC_MSG_RESULT($HAS_S_ISSOCK)
585 if test $HAS_S_ISSOCK = yes; then
586         AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK])
587 fi
588
589 dnl Check for missing typedefs
590 AC_TYPE_MODE_T
591 AC_TYPE_OFF_T
592 AC_TYPE_PID_T
593 AC_TYPE_SIZE_T
594
595 dnl Checks for library functions.
596 AC_FUNC_VPRINTF
597 dnl XXX don't want to re-enable code that's been unused for years at this
598 dnl point, but should offer good performance improvements, check after
599 dnl 4.4.2.1...
600 dnl AC_FUNC_MMAP
601
602 AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_aton)
603 AC_CHECK_FUNCS(mtrace)
604 AC_CHECK_FUNCS(strndup strerror)
605
606 AC_REPLACE_FUNCS(basename getcwd getwd)
607 AC_REPLACE_FUNCS(putenv realpath setenv)
608 AC_REPLACE_FUNCS(stpcpy stpncpy strcspn)
609 AC_REPLACE_FUNCS(strdup strtol strtoul strspn strstr)
610
611 AC_CHECK_FUNCS(__secure_getenv)
612
613 AC_CHECK_FUNCS(regcomp)
614
615 AC_CHECK_FUNCS(ftok)
616
617 AC_CHECK_FUNCS([mkstemp], [], [AC_MSG_ERROR([mkstemp() is required by rpm])])
618
619 dnl XXX Glob *is* broken on linux with libc5, solaris and possibly aix when
620 dnl %files gets something like
621 dnl     /usr/*/locale/*/LC_MESSAGES/*.mo
622 dnl (Note: more than one asterisk in glob pattern.)
623 dnl
624 dnl XXX Glob is "fixed" in glibc-2.3.3-61, but the cost is that
625 dnl dangling symlinks are no longer globbed. Always use the internal glob.
626 AC_DEFINE(USE_GNU_GLOB, 1, [Use the included glob.c?])
627 AC_LIBOBJ(glob)
628 AC_LIBOBJ(fnmatch)
629
630 dnl check if python is requested
631 AC_ARG_ENABLE(python, [AS_HELP_STRING([--enable-python],[build rpm python bindings])],
632 [case "$enable_python" in
633 yes|no) ;;
634 *) AC_MSG_ERROR([invalid argument to --enable-python])
635   ;;
636 esac],
637 [enable_python=no])
638
639 AS_IF([test "$enable_python" = yes],[
640   AM_PATH_PYTHON([2.6],[
641     WITH_PYTHON_INCLUDE=`${PYTHON} -c 'from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_inc())'`
642     WITH_PYTHON_SUBPACKAGE=1
643     save_CPPFLAGS="$CPPFLAGS"
644     CPPFLAGS="$CPPFLAGS -I$WITH_PYTHON_INCLUDE"
645     AC_CHECK_HEADER([Python.h],[],
646       [AC_MSG_ERROR([missing Python.h])
647       ])
648     CPPFLAGS="$save_CPPFLAGS"
649     save_LIBS="$LIBS"
650     AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION} python],[
651       WITH_PYTHON_LIB="$ac_res"
652     ],[AC_MSG_ERROR([missing python library])
653     ])
654     LIBS="$save_LIBS"
655   ])
656 ],[
657     WITH_PYTHON_INCLUDE=
658     WITH_PYTHON_LIB=
659     WITH_PYTHON_SUBPACKAGE=0
660 ])
661
662 AC_SUBST(WITH_PYTHON_INCLUDE)
663 AC_SUBST(WITH_PYTHON_LIB)
664
665 AM_CONDITIONAL(PYTHON,[test "$WITH_PYTHON_SUBPACKAGE" = 1])
666
667 AC_PATH_PROG(DOXYGEN, doxygen, no)
668 dnl
669 dnl Only build internal API + source hacking docs on request
670 dnl
671 AC_ARG_WITH(hackingdocs, [AS_HELP_STRING([--with-hackingdocs],[build rpm hacking docs])],,[with_hackingdocs=no])
672
673 case "$with_hackingdocs" in
674 auto)
675   AS_IF([test "$DOXYGEN" = no],[with_hackingdocs=no],[with_hackingdocs=no])
676   ;;
677 yes)
678   AS_IF([test "$DOXYGEN" = no],
679     [AC_MSG_ERROR([rpm hacking docs eeds doxygen in PATH])])
680   ;;
681 esac
682 AC_CHECK_PROG(HAVE_DOT,[dot],[YES],[NO])
683
684 WITH_SELINUX_LIB=
685 AC_ARG_WITH(selinux, [AS_HELP_STRING([--with-selinux],[build with selinux support])],
686 [case "$with_selinux" in
687 yes|no) ;;
688 *) AC_MSG_ERROR([invalid argument to --with-selinux])
689   ;;
690 esac],
691 [with_selinux=no])
692
693 AS_IF([test "$with_selinux" = yes],[
694   AC_CHECK_HEADER([selinux/selinux.h],[
695     AC_CHECK_LIB(selinux,[is_selinux_enabled],[with_selinux=yes],[
696       AC_MSG_ERROR([--with-selinux given, but libselinux not found])])
697   ],[
698     AC_MSG_ERROR([--with-selinux given, but selinux/selinux.h not found])
699   ])
700 ])
701
702 AS_IF([test "$with_selinux" = yes],[
703   AC_DEFINE(WITH_SELINUX, 1, [Build with selinux support?])
704   WITH_SELINUX_LIB="-lselinux"
705 ])
706 AC_SUBST(WITH_SELINUX_LIB)
707 AM_CONDITIONAL(SELINUX,[test "$with_selinux" = yes])
708
709 # libcap
710 WITH_CAP_LIB=
711 AC_ARG_WITH(cap, [AS_HELP_STRING([--with-cap],[build with capability support])],
712 [case "$with_cap" in
713 yes|no) ;;
714 *) AC_MSG_ERROR([invalid argument to --with-cap])
715   ;;
716 esac],
717 [with_cap=no])
718
719 AS_IF([test "$with_cap" = yes],[
720   AC_CHECK_HEADER([sys/capability.h],[
721     AC_CHECK_LIB(cap,[cap_get_file], [
722       with_cap=yes
723       save_LIBS="$LIBS"
724       AC_CHECK_LIB(cap,[cap_compare], [
725         AC_DEFINE(HAVE_CAP_COMPARE, 1, [Have cap_compare function?])
726       ])
727       LIBS="$save_LIBS"
728     ],[
729       AC_MSG_ERROR([--with-cap given, but libcap not found])])
730   ],[
731     AC_MSG_ERROR([--with-cap given, but sys/capability.h not found])
732   ])
733 ])
734
735 AS_IF([test "$with_cap" = yes],[
736   AC_DEFINE(WITH_CAP, 1, [Build with capability support?])
737   WITH_CAP_LIB="-lcap"
738 ])
739 AC_SUBST(WITH_CAP_LIB)
740 AM_CONDITIONAL(CAP,[test "$with_cap" = yes])
741
742 WITH_ACL_LIB=
743 AC_ARG_WITH(acl, [AS_HELP_STRING([--with-acl],[build with acl support])],
744 [case "$with_acl" in
745 yes|no) ;;
746 *) AC_MSG_ERROR([invalid argument to --with-acl])
747   ;;
748 esac],
749 [with_acl=no])
750
751 AS_IF([test "$with_acl" = yes],[
752   dnl verification uses non-portable acl_equiv_mode() 
753   AC_CHECK_HEADER([acl/libacl.h],[
754     AC_CHECK_LIB(acl,[acl_equiv_mode],[with_acl=yes],[
755       AC_MSG_ERROR([--with-acl given, but libacl not found or not suitable])])
756   ],[
757     AC_MSG_ERROR([--with-acl given, but acl/libacl.h not found])
758   ])
759 ])
760
761 AS_IF([test "$with_acl" = yes],[
762   AC_DEFINE(WITH_ACL, 1, [Build with acl support?])
763   WITH_ACL_LIB="-lacl"
764 ])
765 AC_SUBST(WITH_ACL_LIB)
766 AM_CONDITIONAL(ACL,[test "$with_acl" = yes])
767
768 WITH_LUA_LIB=
769 WITH_LUA_INCLUDE=
770 AC_ARG_WITH(lua, [AS_HELP_STRING([--with-lua],[build with lua support])],,[with_lua=yes])
771 AS_IF([test "$with_lua" = yes],[
772   AC_CHECK_HEADER([lua.h],[
773     AC_CHECK_LIB(lua,[luaL_openlibs],[with_lua=yes],[
774       AC_MSG_ERROR([--with-lua given, but liblua not found])
775     ], 
776     [-lm])
777   ],[
778       AC_MSG_ERROR([--with-lua given, but lua.h not found])
779   ])
780 ])
781
782 AS_IF([test "$with_lua" = yes],[
783   AC_DEFINE(WITH_LUA, 1, [Build with lua support?])
784   WITH_LUA_INCLUDE=
785   WITH_LUA_LIB="-llua -lm" 
786 ])
787 AC_SUBST(WITH_LUA_LIB)
788 AC_SUBST(WITH_LUA_INCLUDE)
789 AM_CONDITIONAL(WITH_LUAEXT,[test "$with_lua" = yes])
790
791 with_dmalloc=no
792 AC_ARG_WITH(dmalloc, [AS_HELP_STRING([--with-dmalloc],[build with dmalloc debugging support])])
793 if test "$with_dmalloc" = yes ; then
794   AC_DEFINE(DMALLOC, 1, [Build with dmalloc support?])
795   LIBS="$LIBS -ldmalloc"
796 fi
797
798 AC_CHECK_FUNCS(setlocale)
799
800 AC_CHECK_FUNCS(getpassphrase)
801
802 AC_CHECK_FUNC(getmntent, AC_DEFINE(HAVE_GETMNTENT, 1, [Define if you have the getmntent() function]), [
803   AC_CHECK_FUNC(mntctl, AC_DEFINE(HAVE_MNTCTL, 1, [Define as 1 if you have mntctl() (only aix?)]),[
804     AC_CHECK_FUNC(getmntinfo, AC_DEFINE(HAVE_GETMNTINFO, 1, [Define as 1 if you have getmntinfo() (Mac OS X)]), [
805       AC_CHECK_FUNC(getmntinfo_r, AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if you have getmntinfo_r() (only osf?)]), [
806         AC_CHECK_LIB(c_r, getmntinfo_r, [LIBS="$LIBS -lc_r"; 
807                                         AC_DEFINE(HAVE_GETMNTINFO_R, 1, [Define as 1 if you have getmntinfo_r() (only osf?)])], [
808                  AC_DEFINE([USE_GETMNTENT], 1, [Defined if getmntent replacement is used])
809                  AC_LIBOBJ(getmntent)])
810       ])
811     ])
812   ])
813 ])
814
815 AC_CHECK_FUNC(lchown,
816    [__CHOWN_RHF="%{__chown} -Rhf"
817     __CHGRP_RHF="%{__chgrp} -Rhf"
818     AC_DEFINE(HAVE_LCHOWN, 1, [Define as 1 if you have lchown()])],
819    [__CHOWN_RHF="%{__chown} -Rf"
820     __CHGRP_RHF="%{__chgrp} -Rf"
821     dnl Does chown() follow symlinks? This should be a good enough test.
822     AC_MSG_CHECKING(whether chown() follows symlinks)
823     AC_ARG_ENABLE([broken-chown],
824             [AS_HELP_STRING([--enable-broken-chown],[this system's chown follows symbolic links])], 
825             result=$enableval, result=unknown)
826     if echo "$build" | ${EGREP} "(aix)|(hpux)|(linux)" > /dev/null ; then
827         result=yes
828     elif echo "$build" | ${EGREP} "(nextstep)" > /dev/null ; then
829         result=no
830     fi
831     if test $result = unknown; then
832         if test `${__ID} | cut -f2 -d\= | cut -f1 -d\(` = 0; then
833             rm -f foo bar
834             touch foo
835             ln -s foo bar
836             ${__CHOWN} 10 bar
837             if test `ls -l foo | awk '{print $3}'` != "root"; then
838                 result=yes
839             else
840                 result=no
841             fi
842             ${__RM} -f foo bar
843         else
844             AC_MSG_CHECKING((cannot check by non-root user))
845             result=no
846         fi
847     fi
848
849     AC_MSG_RESULT($result)
850     if test $result = yes; then
851             AC_DEFINE(CHOWN_FOLLOWS_SYMLINK, 1, [Define as 1 if chown() follows symlinks and you don't have lchown()])
852     fi])
853 AC_SUBST(__CHOWN_RHF)
854 AC_SUBST(__CHGRP_RHF)
855
856 if echo "$host_os" | grep sco > /dev/null; then
857         echo "hacking things up for sco"
858         AC_DEFINE(NEED_STRINGS_H, 1, [Define as one if we need to include <strings.h> (along with <string.h>)])
859         AC_DEFINE(HAVE_STRUCT_MNTTAB, 1,
860         [Define as 1 if you have "struct mnttab" (only sco?)])
861 elif echo "$host_os" | grep sunos > /dev/null; then
862         echo "hacking things up for sunos"
863         CFLAGS="$CFLAGS -D__USE_FIXED_PROTOTYPES__"
864         AC_DEFINE(NEED_STRINGS_H, 1, [Define as one if we need to include <strings.h> (along with <string.h>)])
865         AC_DEFINE(NEED_MYREALLOC, 1, [Define as 1 if we need myrealloc])
866         AC_LIBOBJ(myrealloc)
867 fi
868
869 #
870 # get rid of the 4-th tuple, if config.guess returned "linux-gnu" for host_os
871 #
872 host_os_gnu=-gnu
873 if echo "$host_os" | grep '.*-gnulibc1' > /dev/null ; then
874         host_os=`echo "${host_os}" | sed 's/-gnulibc1$//'`
875 fi
876 if echo "$host_os" | grep '.*-gnueabi' > /dev/null ; then
877         host_os=`echo "${host_os}" | sed 's/-gnueabi$//'`
878         host_os_gnu=-gnueabi
879 fi
880 if echo "$host_os" | grep '.*-gnu' > /dev/null ; then
881         host_os=`echo "${host_os}" | sed 's/-gnu$//'`
882 fi
883
884 changequote(<, >)
885 host_os_exact="${host_os}"
886 host_os_major=`echo "${host_os}" | sed 's/\..*$//'`
887 host_os_noversion=`echo "${host_os}" | sed 's/[0-9]*\..*$//'`
888 changequote([, ])
889
890 rm -f ./find-provides
891 if test -f ${srcdir}/autodeps/${host_cpu}-${host_os_exact}.prov ; then
892         echo "using ${srcdir}/autodeps/${host_cpu}-${host_os_exact}.prov for automatic provides generation"
893     ln -s ${srcdir}/autodeps/${host_cpu}-${host_os_exact}.prov ./find-provides
894 elif test -f ${srcdir}/autodeps/${host_os_exact}.prov ; then
895         echo "using ${srcdir}/autodeps/${host_os_exact}.prov for automatic provides generation"
896     ln -s ${srcdir}/autodeps/${host_os_exact}.prov ./find-provides
897 elif test -f ${srcdir}/autodeps/${host_os_major}.prov ; then
898         echo "using ${srcdir}/autodeps/${host_os_major}.prov for automatic provides generation"
899     ln -s ${srcdir}/autodeps/${host_os_major}.prov ./find-provides
900 elif test -f ${srcdir}/autodeps/${host_os_noversion}.prov ; then
901         echo "using ${srcdir}/autodeps/${host_os_noversion}.prov for automatic provides generation"
902     ln -s ${srcdir}/autodeps/${host_os_noversion}.prov ./find-provides
903 else
904     echo "*** no default provides information is available for ${host_os_noversion}"
905     ln -s ${srcdir}/autodeps/none ./find-provides
906 fi
907
908 rm -f ./find-requires
909 if test -f ${srcdir}/autodeps/${host_cpu}-${host_os_exact}.req ; then
910         echo "using ${srcdir}/autodeps/${host_cpu}-${host_os_exact}.req for automatic requires generation"
911     ln -s ${srcdir}/autodeps/${host_cpu}-${host_os_exact}.req ./find-requires
912 elif test -f ${srcdir}/autodeps/${host_os_exact}.req ; then
913         echo "using ${srcdir}/autodeps/${host_os_exact}.req for automatic requires generation"
914     ln -s ${srcdir}/autodeps/${host_os_exact}.req ./find-requires
915 elif test -f ${srcdir}/autodeps/${host_os_major}.req ; then
916         echo "using ${srcdir}/autodeps/${host_os_major}.req for automatic requires generation"
917     ln -s ${srcdir}/autodeps/${host_os_major}.req ./find-requires
918 elif test -f ${srcdir}/autodeps/${host_os_noversion}.req ; then
919         echo "using ${srcdir}/autodeps/${host_os_noversion}.req for automatic requires generation"
920     ln -s ${srcdir}/autodeps/${host_os_noversion}.req ./find-requires
921 else
922     echo "*** no default requires information is available for ${host_os_noversion}"
923     ln -s ${srcdir}/autodeps/none ./find-requires
924 fi
925
926 dnl Determine the canonical arch-vendor-os for the host machine
927 case "${host_cpu}" in
928 *86)            RPMCANONCOLOR=0; RPMCANONARCH=i386 ;;
929 ia32e*)         RPMCANONCOLOR=3; RPMCANONARCH=ia32e ;;
930 amd64*)         RPMCANONCOLOR=3; RPMCANONARCH=amd64 ;;
931 x86_64*)        RPMCANONCOLOR=3; RPMCANONARCH=x86_64 ;;
932 alpha*)         RPMCANONCOLOR=0; RPMCANONARCH=alpha ;;
933 sparc64*)       RPMCANONCOLOR=3; RPMCANONARCH=sparc64 ;;
934 sparc*)         RPMCANONCOLOR=3; RPMCANONARCH=sparc ;;
935 ia64*)          RPMCANONCOLOR=2; RPMCANONARCH=ia64 ;;
936 s390x*)         RPMCANONCOLOR=3; RPMCANONARCH=s390x ;;
937 s390*)          RPMCANONCOLOR=0; RPMCANONARCH=s390 ;;
938 powerpc64*|ppc64*)      RPMCANONCOLOR=3; RPMCANONARCH=ppc64 ;;
939 powerpc*|ppc*)  RPMCANONCOLOR=0; RPMCANONARCH=ppc ;;
940 arm*)           RPMCANONCOLOR=0; RPMCANONARCH=arm ;;
941 mipsel*)        RPMCANONCOLOR=0; RPMCANONARCH=mipsel ;;
942 mips*)          RPMCANONCOLOR=0; RPMCANONARCH=mips ;;
943 m68k*)          RPMCANONCOLOR=0; RPMCANONARCH=m68k ;;
944 sh3*)           RPMCANONCOLOR=0; RPMCANONARCH=sh3 ;;
945 sh4*)           RPMCANONCOLOR=0; RPMCANONARCH=sh4 ;;
946 *)              RPMCANONCOLOR=0; RPMCANONARCH=unknown ;;
947 esac
948 case "${host_os_noversion}" in
949 mint)           RPMCANONARCH=m68kmint ;;
950 esac
951 RPMCANONVENDOR="$build_vendor"
952 case "${build_vendor}" in
953 unknown|pc|ibm|redhat|pld|mandrake|conectiva|lvr|yellowdog|caos|suse)
954         test -f /etc/redhat-release &&          RPMCANONVENDOR=redhat
955         test -f /etc/SuSE-release &&            RPMCANONVENDOR=suse
956         test -f /etc/pld-release &&             RPMCANONVENDOR=pld
957         test -f /etc/mandrake-release &&        RPMCANONVENDOR=mandrake
958         test -f /etc/conectiva-release &&       RPMCANONVENDOR=conectiva
959         test -f /etc/lvr-release &&             RPMCANONVENDOR=lvr
960         test -f /etc/yellowdog-release &&       RPMCANONVENDOR=yellowdog
961         test -f /etc/caos-release &&            RPMCANONVENDOR=caos
962         ;;
963 esac
964 RPMCANONOS="$host_os_noversion"
965 RPMCANONGNU="$host_os_gnu"
966 AC_SUBST(RPMCANONCOLOR)
967 AC_SUBST(RPMCANONARCH)
968 AC_SUBST(RPMCANONVENDOR)
969 AC_SUBST(RPMCANONOS)
970 AC_SUBST(RPMCANONGNU)
971 AC_DEFINE_UNQUOTED([RPMCANONVENDOR],["${RPMCANONVENDOR}"],[canonical vendor])
972
973 if test X"$prefix" = XNONE ; then
974     usrprefix="$ac_default_prefix"
975 else
976     usrprefix=$prefix
977 fi
978
979 RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
980 AC_SUBST(RPMCONFIGDIR)
981
982 AC_SUBST(OBJDUMP)
983
984 if test "$with_external_db" = no; then
985     AC_CONFIG_SUBDIRS(db3)
986 fi
987
988 AM_CONDITIONAL([WITH_INTERNAL_DB],[test "$with_external_db" = no])
989 AM_CONDITIONAL([DOXYGEN],[test "$DOXYGEN" != no])
990 AM_CONDITIONAL([HACKINGDOCS],[test "$with_hackingdocs" = yes])
991
992 AC_PATH_PROG(AUTOM4TE,autom4te,:)
993
994 AS_IF([test "$ac_cv_header_stdint_h" = "yes"],[
995 AC_DEFINE([__RPM_USES_STDINT_H__],[1],[if rpm uses stdint.h])
996 ])
997
998 AC_SUBST([dirstamp],[\${am__leading_dot}dirstamp])
999
1000 AC_CONFIG_FILES([Makefile
1001         rpmio/Makefile lib/Makefile build/Makefile
1002         po/Makefile.in scripts/Makefile 
1003         misc/Makefile 
1004         doc/Makefile
1005         python/Makefile
1006         luaext/Makefile
1007         tests/Makefile
1008   ])
1009 AC_OUTPUT