1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
dnl Process this file with autoconf to produce a configure script. -*-m4-*-
AC_INIT(src/db-alias.c)
AM_INIT_AUTOMAKE(nss_db, 2.2.3)
AM_CONFIG_HEADER(config.h)
dnl Set of available languages.
ALL_LINGUAS="de nl"
# Check for a --with-db argument.
AC_ARG_WITH(db, dnl
--with-db=DIR find Berkeley DB library and headers with prefix DIR,
[dnl
case "$with_db" in
yes|''|no) ;;
*) libdb_include="-I$withval/include"
libdb_libs="-L$withval/lib" ;;
esac
])
AC_ARG_WITH(db-include, dnl
--with-db-include=DIR find Berkeley DB headers in DIR,
[dnl
case "$with_db_include" in
''|no) ;;
*) libdb_include="-I$withval" ;;
esac
])
AC_ARG_WITH(db-lib, dnl
--with-db-lib=DIR find Berkeley DB library in DIR,
[dnl
case "$with_db_lib" in
''|no) ;;
*) libdb_libs="-L$withval" ;;
esac
])
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP dnl Later checks need this.
AM_DISABLE_STATIC dnl Makes no sense for a NSS module
AM_PROG_LIBTOOL
DB_CFLAGS="$libdb_include"
DB_LIBS="$libdb_libs"
CPPFLAGS="$CPPFLAGS $DB_CFLAGS"
AC_CHECK_HEADER(db.h,, AC_MSG_ERROR([
*** Could not find Berkeley DB headers.]))
AC_CHECK_LIB(db, db_version,, AC_MSG_ERROR([
*** Could not find Berkeley DB library.]))
AC_CACHE_CHECK([Berkeley DB version], nss_db_cv_db_version,
[AC_TRY_CPP(
[
# include <db.h>
# ifndef DB_VERSION_STRING
# error "Unknown"
# endif
# if DB_VERSION_MAJOR < 2
# error "Too old"
# endif
# if DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR < 4
# error "Too old"
# endif
],
nss_db_cv_db_version="ok",
nss_db_cv_db_version="not ok")
])
if test "$nss_db_cv_db_version" != "ok"; then
AC_MSG_ERROR([
*** Unsupported Berkeley DB version detected.])
fi
AC_CANONICAL_HOST
slibdir=NONE
case "$host" in
*-linux*)
# The Linux filesystem standard prescribed where to place "essential"
# files. I.e., when the installation prefix is "/usr" we have to place
# shared library objects on the root partition in /lib.
if test "$prefix" = "/usr" -o "$prefix" = "/usr"; then
# 64bit libraries on sparc go to /lib64 and not /lib
if test "$host_cpu" = "sparc64"; then
slibdir="/lib64"
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
fi
else
slibdir="/lib"
fi
fi
;;
esac
if test "$slibdir" = "NONE"; then
slibdir='${libdir}'
fi
AC_SUBST(DB_CFLAGS)
AC_SUBST(DB_LIBS)
AC_SUBST(slibdir)
dnl Internationalization macros.
AM_GNU_GETTEXT
AC_OUTPUT([Makefile src/Makefile intl/Makefile po/Makefile.in])
|