2004-03-24 01:48:28 -08:00
# get rid of that stupid cache mechanism
rm -f config.cache
2009-04-22 07:07:05 -07:00
AC_INIT([embryo], 0.9.9.060, [enlightenment-devel@lists.sourceforge.net])
2008-10-21 01:32:23 -07:00
AC_PREREQ([2.52])
AC_CONFIG_SRCDIR([configure.ac])
2008-10-26 03:16:50 -07:00
AC_CONFIG_MACRO_DIR([m4])
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)
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"
2009-04-22 07:07:05 -07:00
release="ver-pre-01"
2009-04-21 07:17:42 -07:00
release_info="-release $release"
2007-11-04 01:44:15 -08:00
AC_SUBST(version_info)
2009-04-21 07:17:42 -07:00
AC_SUBST(release_info)
2007-11-04 01:44:15 -08:00
2008-10-20 11:47:00 -07:00
2008-10-26 01:04:06 -07:00
### Default options with respect to host
requirement_embryo=""
embryoincludedir="${datadir}/include"
### Additional options to configure
2008-11-10 22:57:40 -08:00
### Checks for programs
AC_PROG_CC
# doxygen program for documentation building
EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
2008-10-26 01:04:06 -07:00
### Checks for libraries
PKG_PROG_PKG_CONFIG
# Evil library for compilation on Windows
EFL_EMBRYO_BUILD=""
2007-02-10 09:23:09 -08:00
case "$host_os" in
2008-10-26 01:04:06 -07:00
mingw* | cegcc*)
PKG_CHECK_MODULES([EVIL], [evil])
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
requirement_embryo="evil ${requirement_embryo}"
EFL_EMBRYO_BUILD="-DEFL_EMBRYO_BUILD"
;;
2007-02-10 09:23:09 -08:00
esac
2008-10-26 01:04:06 -07:00
AC_SUBST(EFL_EMBRYO_BUILD)
2007-02-10 09:23:09 -08:00
2008-10-26 01:04:06 -07:00
### Checks for header files
2008-04-10 22:59:42 -07:00
2008-10-21 01:32:23 -07:00
AC_CHECK_HEADER([fnmatch.h],
[dummy="yes"],
[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
2008-10-26 01:04:06 -07:00
### Checks for types
### Checks for structures
### Checks for compiler characteristics
AC_C_BIGENDIAN
AM_PROG_CC_C_O
AC_C_CONST
AC_C_INLINE
AC_PROG_CC_STDC
AC_HEADER_STDC
AC_C___ATTRIBUTE__
EMBRYO_CPPFLAGS=""
EMBRYO_CFLAGS=""
case "$host_os" in
mingw32ce*)
EMBRYO_CPPFLAGS="-D_WIN32_WCE=0x0420"
;;
cegcc*)
EMBRYO_CPPFLAGS="-D_WIN32_WCE=0x0420"
EMBRYO_CFLAGS="-mwin32"
;;
esac
AC_SUBST(EMBRYO_CPPFLAGS)
AC_SUBST(EMBRYO_CFLAGS)
### Checks for linker characteristics
lt_enable_auto_import=""
case "$host_os" in
mingw* | cegcc*)
lt_enable_auto_import="-Wl,--enable-auto-import"
;;
esac
AC_SUBST(lt_enable_auto_import)
### Checks for library functions
AC_FUNC_ALLOCA
case "$host_os" in
mingw* | cegcc*)
AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Defined to 1 (MinGW / CeGCC platform)])
;;
*)
AC_CHECK_FUNCS(gettimeofday)
;;
esac
fnmatch_libs=""
2008-10-21 01:32:23 -07:00
AC_CHECK_FUNCS([fnmatch], [res="yes"], [res="no"])
2004-10-12 09:15:54 -07:00
if test "x$res" = "xno"; then
2008-10-21 01:32:23 -07:00
AC_SEARCH_LIBS([fnmatch],
2008-12-06 10:42:30 -08:00
[fnmatch evil iberty],
2008-10-21 01:32:23 -07:00
[res="yes"],
[res="no"])
if test "x$res" = "xno"; then
AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch, nor libiberty, nor libevil])
2008-10-26 01:04:06 -07:00
fi
fnmatch_libs="${ac_cv_search_fnmatch}"
2004-10-12 09:15:54 -07:00
fi
2008-10-26 01:04:06 -07:00
AC_SUBST(fnmatch_libs)
2004-10-12 09:15:54 -07:00
2008-10-26 01:04:06 -07:00
AC_SUBST(requirement_embryo)
2007-03-20 16:11:21 -07:00
AC_SUBST(embryoincludedir)
2004-03-24 01:48:28 -08:00
AC_OUTPUT([
Makefile
2008-10-26 01:04:06 -07:00
doc/Makefile
doc/embryo.dox
2004-03-24 01:48:28 -08:00
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
2008-10-26 02:59:13 -07:00
echo " Documentation........: ${enable_doc}"
echo
2007-11-04 01:44:15 -08:00
echo " Compilation..........: make"
echo
echo " Installation.........: make install"
echo
echo " prefix.............: $prefix"
echo