2004-03-24 01:48:28 -08:00
# get rid of that stupid cache mechanism
rm -f config.cache
2009-12-01 23:22:35 -08:00
AC_INIT([embryo], [0.9.9.063], [enlightenment-devel@lists.sourceforge.net])
2009-12-02 14:50:36 -08:00
release="ver-pre-svn-05"
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
2009-10-06 09:55:29 -07:00
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
AM_CONFIG_HEADER([config.h])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
2004-03-24 01:48:28 -08:00
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)
2009-05-13 11:52:48 -07:00
case "$host_os" in
mingw32ce* | cegcc*)
;;
*)
release_info="-release $release"
;;
esac
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"])
2009-05-15 01:32:41 -07:00
# pkg-config
2008-10-26 01:04:06 -07:00
PKG_PROG_PKG_CONFIG
2009-10-02 10:14:12 -07:00
# Check whether pkg-config supports Requires.private
if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
pkgconfig_requires_private="Requires.private"
else
pkgconfig_requires_private="Requires"
fi
AC_SUBST(pkgconfig_requires_private)
2009-05-15 01:32:41 -07:00
### Checks for libraries
2008-10-26 01:04:06 -07:00
# 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
2009-05-23 15:39:01 -07:00
echo " Documentation........: ${build_doc}"
2008-10-26 02:59:13 -07:00
echo
2007-11-04 01:44:15 -08:00
echo " Compilation..........: make"
echo
echo " Installation.........: make install"
echo
echo " prefix.............: $prefix"
echo