2004-03-24 01:48:28 -08:00
# get rid of that stupid cache mechanism
rm -f config.cache
2008-01-24 19:35:49 -08:00
AC_INIT(embryo, 0.9.1.042, enlightenment-devel@lists.sourceforge.net)
2007-11-04 01:44:15 -08:00
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.in)
2004-03-24 01:48:28 -08:00
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_ISC_POSIX
2007-11-04 01:44:15 -08:00
AM_INIT_AUTOMAKE(1.6 dist-bzip2)
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
2008-04-19 23:14:43 -07:00
AM_PROG_CC_C_O
2007-11-04 01:44:15 -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 23:13:51 -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:44:15 -08:00
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
AC_SUBST(version_info)
2008-03-22 01:31:38 -07:00
WIN32_CFLAGS=""
2008-04-19 23:14:43 -07:00
lt_no_undefined=""
lt_enable_auto_import=""
2007-02-10 09:23:09 -08:00
case "$host_os" in
2008-04-19 23:14:43 -07:00
mingw*|cegcc)
2008-03-21 10:18:25 -07:00
PKG_CHECK_MODULES([EVIL], evil)
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed])
dnl needed for correct definition of EAPI
AC_DEFINE(EFL_EMBRYO_BUILD, 1, [Define to mention that embryo is built])
2008-04-10 22:59:42 -07:00
AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Defined to 1 (MinGW / CeGCC platform)])
2008-03-22 01:31:38 -07:00
if test "x$host_os" = "xcegcc" ; then
WIN32_CFLAGS="-mwin32"
2008-04-19 23:14:43 -07:00
lt_enable_auto_import="-Wl,--enable-auto-import"
2008-03-22 01:31:38 -07:00
fi
2008-04-19 23:14:43 -07:00
lt_no_undefined="-no-undefined"
2007-02-10 09:23:09 -08:00
;;
2008-04-10 22:59:42 -07:00
*)
AC_CHECK_FUNCS(gettimeofday)
2007-02-10 09:23:09 -08:00
esac
2008-03-22 01:31:38 -07:00
AC_SUBST(WIN32_CFLAGS)
2008-04-19 23:14:43 -07:00
AC_SUBST(lt_no_undefined)
AC_SUBST(lt_enable_auto_import)
2007-02-10 09:23:09 -08:00
2008-04-10 22:59:42 -07:00
dnl Checking for __attribute__ support
AC_MSG_CHECKING([for __attribute__])
2008-04-19 23:14:43 -07:00
AC_CACHE_VAL(_cv_have___attribute__,
2008-04-10 22:59:42 -07:00
[
AC_TRY_COMPILE([#include <stdlib.h>],
[int func(int x); int foo(int x __attribute__ ((unused))) { exit(1); }],
2008-04-19 23:14:43 -07:00
[_cv_have___attribute__="yes"],
[_cv_have___attribute__="no"])
2008-04-10 22:59:42 -07:00
]
)
2008-04-19 23:14:43 -07:00
if test "x${_cv_have___attribute__}" = "xyes" ; then
2008-04-10 22:59:42 -07:00
AC_DEFINE(HAVE___ATTRIBUTE__, 1, [Define to 1 if your compiler has __attribute__])
fi
2008-04-19 23:14:43 -07:00
AC_MSG_RESULT(${_cv_have___attribute__})
2008-04-10 22:59:42 -07:00
AC_FUNC_ALLOCA
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)
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
2004-03-24 01:48:28 -08:00
])
2007-11-04 01:44:15 -08: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
echo " prefix.............: $prefix"
echo