2004-03-24 01:48:28 -08:00
# get rid of that stupid cache mechanism
rm -f config.cache
AC_INIT(configure.in)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_ISC_POSIX
2007-08-26 07:33:41 -07:00
AM_INIT_AUTOMAKE(embryo, 0.9.1.041)
2004-03-24 01:48:28 -08:00
AM_CONFIG_HEADER(config.h)
2004-03-24 18:07:28 -08:00
AC_C_BIGENDIAN
2004-03-24 01:48:28 -08:00
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST
AM_ENABLE_SHARED
AM_PROG_LIBTOOL
2004-04-01 09:32:30 -08:00
AC_FUNC_ALLOCA
2004-03-24 01:48:28 -08:00
2004-10-12 09:15:54 -07:00
AC_CHECK_FUNCS(gettimeofday)
2007-02-10 09:23:09 -08:00
create_shared_lib=""
case "$host_os" in
mingw|mingw32)
create_shared_lib="-no-undefined "
;;
esac
AC_SUBST(create_shared_lib)
2004-10-12 09:15:54 -07:00
AC_CHECK_HEADERS(fnmatch.h,, AC_MSG_ERROR([Cannot find fnmatch.h. Make sure your CFLAGS environment variable contains include lines for the location of this file]))
2007-02-10 09:23:09 -08:00
fnmatch_libs=""
2004-10-12 09:15:54 -07:00
AC_CHECK_FUNCS(fnmatch, res=yes, res=no)
if test "x$res" = "xno"; then
2007-02-10 09:23:09 -08:00
AC_CHECK_LIB(fnmatch, fnmatch, res=yes fnmatch_libs="-lfnmatch", res=no)
dnl Test for compilation with MinGW.
dnl fnmatch function is in the libiberty library
if test "x$res" = "xno"; then
AC_CHECK_LIB(iberty, fnmatch, res=yes fnmatch_libs="-liberty", res=no)
fi
2004-10-12 09:15:54 -07:00
if test "x$res" = "xno"; then
2007-02-10 09:23:09 -08:00
AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch, nor libiberty])
2004-10-12 09:15:54 -07:00
fi
fi
AC_SUBST(fnmatch_libs)
2004-03-24 01:48:28 -08:00
if test "x${bindir}" = 'xNONE'; then
if test "x${prefix}" = "xNONE"; then
2006-07-13 09:35:46 -07:00
PACKAGE_BIN_DIR="${ac_default_prefix}/bin"
2004-03-24 01:48:28 -08:00
else
2006-07-13 09:35:46 -07:00
PACKAGE_BIN_DIR="${prefix}/bin"
2004-03-24 01:48:28 -08:00
fi
else
2006-07-13 09:35:46 -07:00
PACKAGE_BIN_DIR="${bindir}"
2004-03-24 01:48:28 -08:00
fi
2006-07-13 09:35:46 -07:00
AC_SUBST(PACKAGE_BIN_DIR)
2004-03-24 01:48:28 -08:00
if test "x${libdir}" = 'xNONE'; then
if test "x${prefix}" = "xNONE"; then
2006-07-13 09:35:46 -07:00
PACKAGE_LIB_DIR="${ac_default_prefix}/lib"
2004-03-24 01:48:28 -08:00
else
2006-07-13 09:35:46 -07:00
PACKAGE_LIB_DIR="${prefix}/lib"
2004-03-24 01:48:28 -08:00
fi
else
2006-07-13 09:35:46 -07:00
PACKAGE_LIB_DIR="${libdir}"
2004-03-24 01:48:28 -08:00
fi
2006-07-13 09:35:46 -07:00
AC_SUBST(PACKAGE_LIB_DIR)
if test "x${prefix}" = "xNONE"; then
PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}"
else
PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}"
fi
AC_SUBST(PACKAGE_DATA_DIR)
2007-03-20 16:11:21 -07:00
embryoincludedir='${datadir}/include'
AC_SUBST(embryoincludedir)
2004-03-24 01:48:28 -08:00
AC_OUTPUT([
Makefile
embryo.pc
2004-03-24 02:25:05 -08:00
include/Makefile
2004-03-24 01:48:28 -08:00
src/Makefile
src/lib/Makefile
src/bin/Makefile
2005-03-22 05:10:09 -08:00
README
embryo.spec
2006-03-12 02:40:49 -08:00
debian/changelog
2004-03-24 01:48:28 -08:00
])