dnl $Id: configure.ac,v 1.6 2003/03/15 12:15:15 richdawe Exp $ dnl dnl autoconf script for pakke dnl Copyright (C) 1999-2003 by Richard Dawe dnl AC_PREREQ(2.57) AC_INIT(pakke, 0.2.3, pakke-workers@yahoogroups.com) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR(src/pakke.c) dnl --- Version number components --- dnl These must match those in AC_INIT above. AC_SUBST(PAKKE_VERSION_MAJOR, [0]) AC_SUBST(PAKKE_VERSION_MINOR, [2]) AC_SUBST(PAKKE_VERSION_SUBMINOR, [3]) AC_SUBST(contribdir, [$\(prefix\)/contrib/pakke023]) AC_SUBST(PACKAGE_BASE, [pakk023]) dnl DSM specification version. AC_SUBST(DSM_SPEC_VERSION, [0.6.1]) AC_SUBST(DSM_SPEC_VERSION_MAJOR, [0]) AC_SUBST(DSM_SPEC_VERSION_MINOR, [6]) AC_SUBST(DSM_SPEC_VERSION_SUBMINOR, [1]) dnl --- Miscellanious directories --- dnl See contribdir above too. AC_SUBST(manifestdir, [$\(prefix\)/manifest]) dnl --- Check for programs --- AC_PROG_CC AC_PROG_INSTALL AC_PROG_RANLIB AC_PROG_LEX AC_PROG_YACC dnl AC_PATH_PROG(INSTALL_INFO, install-info) AM_MISSING_PROG(INFO, info) dnl --- Check for headers --- AC_HEADER_STDC AC_CHECK_HEADERS(libgen.h) dnl --- Check for libraries --- dnl zlib for decompression AC_CHECK_LIB(z, zlibVersion) dnl --- Cope with funcs that are in DJGPP's libc, but not Linux's glibc --- AC_CHECK_FUNCS(strlwr) AC_CHECK_FUNCS(fnsplit) dnl --- Debug options --- AC_ARG_ENABLE(debug, [ --enable-debug enable building of debug information], [CFLAGS="$CFLAGS -gstabs+3 -Wall -DDEBUG"; LDFLAGS="$LDFLAGS -gstabs+3"; YFLAGS='-v'], [YFLAGS='']) dnl --- E-mail of the person building pakke --- AC_ARG_ENABLE(email, [ --enable-email= specify builder's e-mail address], [USERMAIL=$enableval], [USERMAIL='']) AC_SUBST(USERMAIL) dnl --- Build options --- AC_ARG_WITH(pmode-stub, [ --with-pmode-stub build with a protected-mode stub], [ case "$withval" in yes) AC_PATH_PROG(PMODE_STUB, pmodstub.exe) ;; *) PMODE_STUB='' ;; esac ], [PMODE_STUB='';]) AC_SUBST(PMODE_STUB) dnl --- Optional libraries --- AC_ARG_WITH(bzip2, [ --with-bzip2 build with bzip2 support (if libbz2.a present)], [AC_CHECK_LIB(bz2, bzDecompress) # Some versions (1.0 at least; possibly others) have a BZ2 prefix on their # functions, so check that too if test x$ac_cv_lib_bz2_bzDecompress = xno; then AC_CHECK_LIB(bz2, BZ2_bzDecompress) fi]) AC_ARG_WITH(mss, [ --with-mss build with Memory Supervision System (if present)], [AC_CHECK_LIB(mss, mss_startup)]) dnl --- Host details --- AC_CANONICAL_HOST DEFAULT_PLATFORM="$host_cpu-$host_vendor-$host_os" AC_SUBST(DEFAULT_PLATFORM) dnl --- Output files --- AC_CONFIG_HEADER(config.h:config.hin) AC_CONFIG_FILES([ Makefile bin/Makefile doc/Makefile doc/version.txi:doc/version.tin include/Makefile include/libpakke/version.h:include/libpakke/version.hin include/libpakke/dsm/version.h:include/libpakke/dsm/version.hin manifest/Makefile share/Makefile share/pakke/Makefile share/pakke/db/Makefile share/pakke/db-avail/Makefile share/pakke/win32/Makefile share/pakke/win32/wget/Makefile src/Makefile src/version.h:src/version.hin src/defaults/Makefile src/libpakke/Makefile test/Makefile test/base64/Makefile test/dep/Makefile test/dsm/Makefile test/install/Makefile test/syncdb/Makefile test/upgrade/Makefile test/user/Makefile test/util/Makefile test/versions/Makefile test/zip/Makefile test/zip/missing/Makefile test/zip/renamed/Makefile ]) AC_OUTPUT