2002-12-02 15:39:26 -08:00
# get rid of that stupid cache mechanism
rm -f config.cache
2008-01-24 19:35:49 -08:00
AC_INIT(eet, 0.9.10.042, enlightenment-devel@lists.sourceforge.net)
2007-11-04 01:10:50 -08:00
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.in)
2004-02-16 23:11:28 -08:00
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_ISC_POSIX
2007-11-04 01:10:50 -08:00
AM_INIT_AUTOMAKE(1.6 dist-bzip2)
2002-12-02 15:39:26 -08:00
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST
2007-11-04 01:10:50 -08:00
AC_LIBTOOL_WIN32_DLL
define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
AC_PROG_LIBTOOL
2007-11-12 07:55:04 -08:00
VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
2007-11-04 01:10:50 -08:00
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
AC_SUBST(version_info)
2005-11-03 19:22:22 -08:00
AC_FUNC_ALLOCA
2002-12-02 15:39:26 -08:00
2004-05-13 17:28:47 -07:00
AC_CHECK_HEADER(zlib.h,, AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file"))
AC_CHECK_HEADER(jpeglib.h,, AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file"))
2004-05-12 20:38:32 -07:00
2008-01-25 21:50:09 -08:00
AC_CHECK_HEADERS_ONCE(netinet/in.h sys/mman.h windows.h winsock2.h)
2004-07-14 09:37:29 -07:00
2007-01-20 07:20:23 -08:00
winsock_libs=""
2007-01-20 07:36:41 -08:00
create_shared_lib=""
2004-10-12 09:15:54 -07:00
case "$host_os" in
mingw|mingw32)
winsock_libs="-lwsock32"
2007-01-20 07:36:41 -08:00
create_shared_lib="-no-undefined "
2004-10-12 09:15:54 -07:00
;;
esac
AC_SUBST(winsock_libs)
2007-01-20 08:51:48 -08:00
AC_SUBST(create_shared_lib)
2004-10-12 09:15:54 -07:00
2007-01-20 07:20:23 -08:00
AC_CHECK_HEADER(fnmatch.h,, AC_MSG_ERROR([Cannot find fnmatch.h. Make sure your CFLAGS environment variable contains include lines for the location of this file. MinGW users: see the INSTALL file]))
2004-10-12 09:15:54 -07:00
2007-01-20 07:20:23 -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-01-20 07:20:23 -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
2004-10-12 09:15:54 -07:00
if test "x$res" = "xno"; then
2007-01-20 07:20:23 -08:00
AC_CHECK_LIB(iberty, fnmatch, res=yes fnmatch_libs="-liberty", res=no)
fi
if test "x$res" = "xno"; then
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-01-17 07:11:55 -08:00
dnl These are needed for fmemopen/open_memstream
AC_DEFINE(_GNU_SOURCE, , [Enable GNU extensions])
2004-07-14 09:37:29 -07:00
AC_CHECK_FUNCS(fmemopen open_memstream realpath)
2003-02-02 17:07:58 -08:00
2005-05-26 08:33:26 -07:00
dnl Check whether the null pointer is zero on this arch
AC_MSG_CHECKING([value of the null pointer])
AC_TRY_RUN([
#include <stdlib.h>
2006-01-14 00:59:42 -08:00
int main (int argc, char **argv) {
void *foo = NULL;
int bar = (int)foo;
return (int)foo;
}
], AC_MSG_RESULT([yes]), [
AC_MSG_RESULT([no])
2005-05-26 08:33:26 -07:00
AC_MSG_WARN([Your system is a bit too funny, eet might not work properly])
2005-06-10 02:40:23 -07:00
], AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
)
2005-05-26 08:33:26 -07:00
2005-09-29 18:37:16 -07:00
#AM_CHECK_DOXYGEN()
2005-09-27 15:10:09 -07:00
2002-12-02 15:39:26 -08:00
AC_OUTPUT([
2002-12-02 16:26:34 -08:00
Makefile
2003-05-08 00:59:58 -07:00
eet.pc
2005-09-27 15:10:09 -07:00
eet.c
2002-12-02 16:26:34 -08:00
src/Makefile
src/lib/Makefile
2007-09-08 02:35:41 -07:00
src/bin/Makefile
2005-03-02 18:29:18 -08:00
README
2005-03-02 17:34:03 -08:00
eet.spec
2002-12-02 15:39:26 -08:00
])
2005-09-27 15:10:09 -07:00
#####################################################################
## Info
echo
echo
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE $VERSION"
echo "------------------------------------------------------------------------"
echo
echo "Configuration Options Summary:"
echo
echo " Compilation..........: make"
echo
echo " Installation.........: make install"
echo
2007-09-25 11:26:49 -07:00
echo " prefix.............: $prefix"
2005-09-27 15:10:09 -07:00
echo