2003-06-02 16:49:56 -07:00
dnl Process this file with autoconf to produce a configure script.
# get rid of that stupid cache mechanism
rm -f config.cache
AC_INIT(configure.in)
2004-02-16 23:13:12 -08:00
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AC_ISC_POSIX
2004-04-15 19:06:39 -07:00
AM_INIT_AUTOMAKE(edje, 0.5.0)
2003-06-02 16:49:56 -07:00
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST
AM_ENABLE_SHARED
AM_PROG_LIBTOOL
2004-04-01 16:16:21 -08:00
AC_FUNC_ALLOCA
2003-06-02 16:49:56 -07:00
2004-10-20 09:48:58 -07:00
AC_CHECK_FUNCS(realpath)
2004-10-12 09:20:12 -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]))
AC_CHECK_FUNCS(fnmatch, res=yes, res=no)
if test "x$res" = "xno"; then
AC_CHECK_LIB(fnmatch, fnmatch, res=yes, res=no)
if test "x$res" = "xno"; then
AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch])
else
fnmatch_libs="-lfnmatch"
fi
fi
AC_SUBST(fnmatch_libs)
2003-06-02 16:49:56 -07:00
if test "x${exec_prefix}" = "xNONE"; then
if test "x${prefix}" = "xNONE"; then
bindir="${ac_default_prefix}/bin";
else
bindir="${prefix}/bin";
fi
else
if test "x${prefix}" = "xNONE"; then
bindir="${ac_default_prefix}/bin";
else
bindir="${prefix}/bin";
fi
fi
if test "x${exec_prefix}" = "xNONE"; then
if test "x${prefix}" = "xNONE"; then
libdir="${ac_default_prefix}/lib";
else
libdir="${prefix}/lib";
fi
else
if test "x${prefix}" = "xNONE"; then
libdir="${ac_default_prefix}/lib";
else
libdir="${prefix}/lib";
fi
fi
2003-06-21 22:16:12 -07:00
dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/share'; then
if test "x${prefix}" = "xNONE"; then
2004-01-14 12:47:05 -08:00
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", [Shared data directory])
2003-06-21 22:16:12 -07:00
else
2004-01-14 12:47:05 -08:00
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", [Shared data directory])
2003-06-21 22:16:12 -07:00
fi
else
2004-01-14 12:47:05 -08:00
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}", [Shared data directory])
2003-06-21 22:16:12 -07:00
fi
2003-06-02 16:49:56 -07:00
dnl Set PACKAGE_BIN_DIR in config.h.
if test "x${bindir}" = 'xNONE'; then
if test "x${prefix}" = "xNONE"; then
2004-01-14 12:47:05 -08:00
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${ac_default_prefix}/bin", [Installation directory for user executables])
2003-06-02 16:49:56 -07:00
else
2004-01-14 12:47:05 -08:00
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${prefix}/bin", [Installation directory for user executables])
2003-06-02 16:49:56 -07:00
fi
else
2004-01-14 12:47:05 -08:00
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${bindir}", [Installation directory for user executables])
2003-06-02 16:49:56 -07:00
fi
dnl Set PACKAGE_LIB_DIR in config.h.
if test "x${libdir}" = 'xNONE'; then
if test "x${prefix}" = "xNONE"; then
2004-01-14 12:47:05 -08:00
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${ac_default_prefix}/lib", [Installation directory for libraries])
2003-06-02 16:49:56 -07:00
else
2004-01-14 12:47:05 -08:00
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${prefix}/lib", [Installation directory for libraries])
2003-06-02 16:49:56 -07:00
fi
else
2004-01-14 12:47:05 -08:00
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${libdir}", [Installation directory for libraries])
2003-06-02 16:49:56 -07:00
fi
dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
2004-01-14 12:47:05 -08:00
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Source code directory])
2003-06-02 16:49:56 -07:00
2004-02-16 23:13:12 -08:00
AC_MSG_CHECKING(whether to build only fb support)
have_fb_only="no"
AC_ARG_ENABLE(fb-only, [ --enable-fb-only enable building of fb support only ], [
if [ test "$enableval" = "yes" ]; then
AC_MSG_RESULT(yes)
have_fb_only="yes"
else
AC_MSG_RESULT(no)
have_fb_only="no"
fi
], [
AC_MSG_RESULT($have_fb_only)
]
)
AC_MSG_CHECKING(whether to build edje_cc)
have_edje_cc="yes"
AC_ARG_ENABLE(edje-cc, [ --disable-edje-cc disable building of edje_cc ], [
if [ test "$enableval" = "yes" ]; then
AC_MSG_RESULT(yes)
have_edje_cc="yes"
else
AC_MSG_RESULT(no)
have_edje_cc="no"
fi
], [
AC_MSG_RESULT($have_edje_cc)
]
)
edje_def=""
if test "x$have_fb_only" = "xyes"; then
edje_def="-DEDJE_FB_ONLY"
fi
AC_SUBST(edje_def)
2004-01-14 16:12:19 -08:00
AC_ARG_WITH(eet,
2004-10-20 11:42:36 -07:00
[ --with-eet=DIR use eet in <DIR>],
2004-01-14 16:12:19 -08:00
[CFLAGS="$CFLAGS -I$withval/include"
2004-10-20 11:42:36 -07:00
LIBS="-L$withval/lib $LIBS"])
2004-01-14 16:12:19 -08:00
2004-10-20 11:42:36 -07:00
AC_PATH_GENERIC(eet, , ,
AC_MSG_ERROR(Cannot find eet: Is eet-config in path?))
2004-03-26 01:10:05 -08:00
2004-10-20 11:42:36 -07:00
AC_ARG_WITH(embryo,
[ --with-embryo=DIR use embryo in <DIR>],
[CFLAGS="$CFLAGS -I$withval/include"
LIBS="-L$withval/lib $LIBS"])
2004-03-26 01:10:05 -08:00
2004-10-20 11:42:36 -07:00
AC_PATH_GENERIC(embryo, 0.9.1, ,
AC_MSG_ERROR(Cannot find embryo: Is embryo-config in path?))
2004-03-26 01:10:05 -08:00
2004-02-16 23:13:12 -08:00
if test "x$have_edje_cc" = "xyes"; then
AC_ARG_WITH(imlib2,
[ --with-imlib2=DIR use imlib2 in <DIR>],
[CFLAGS="$CFLAGS -I$withval/include"
2004-10-20 23:33:22 -07:00
LIBS="-L$withval/lib $LIBS"
IMLIB2_CONFIG="$withval/bin/imlib2-config"])
if [ test -z "$IMLIB2_CONFIG" ]; then IMLIB2_CONFIG="imlib2-config"; fi
imlib2_libs=`$IMLIB2_CONFIG --libs`
imlib2_cflags=`$IMLIB2_CONFIG --cflags`
V=`$IMLIB2_CONFIG --version`
if [ test -z "$V" ]; then
have_edje_cc="no";
2004-10-20 11:42:36 -07:00
AC_MSG_WARN(Cannot find imlib2: Is imlib2-config in path?)
2004-10-20 23:33:22 -07:00
else
AC_DEFINE(HAVE_IMLIB, 1, [Define to 1 if you have Imlib2])
fi
2004-02-16 23:13:12 -08:00
fi
2003-06-11 02:30:28 -07:00
2004-01-14 16:12:19 -08:00
AC_ARG_WITH(evas,
[ --with-evas=DIR use evas in <DIR>],
[CFLAGS="$CFLAGS -I$withval/include"
LIBS="-L$withval/lib $LIBS"])
2004-10-20 11:42:36 -07:00
AC_PATH_GENERIC(evas, , ,
2004-01-14 16:12:19 -08:00
AC_MSG_ERROR(Cannot find evas: Is evas-config in path?))
2004-02-16 23:13:12 -08:00
2004-01-14 16:12:19 -08:00
AC_ARG_WITH(ecore,
[ --with-ecore=DIR use ecore in <DIR>],
[CFLAGS="$CFLAGS -I$withval/include"
LIBS="-L$withval/lib $LIBS"])
2004-10-20 11:42:36 -07:00
AC_PATH_GENERIC(ecore, , ,
2004-01-14 16:12:19 -08:00
AC_MSG_ERROR(Cannot find ecore: Is ecore-config in path?))
2004-02-16 23:13:12 -08:00
2004-03-06 09:20:04 -08:00
AC_MSG_CHECKING([for location of Vim data files])
2004-03-06 07:18:57 -08:00
install_vim="yes";
2004-03-06 09:20:04 -08:00
AC_ARG_WITH(vim,
2004-04-04 03:59:50 -07:00
[ --with-vim=DIR Location of Vim data files [[autodetect]]],
2004-03-06 09:20:04 -08:00
[if test -d "${withval}"; then
vimdir="${withval}"
fi])
if test "x${vimdir}" = "x" ; then
if test -d "${prefix}/share/vim"; then
vimdir="${prefix}/share/vim"
elif test -d "/usr/share/vim"; then
vimdir="/usr/share/vim"
elif test -d "/usr/local/share/vim"; then
vimdir="/usr/local/share/vim"
elif test -d "/opt/share/vim"; then
vimdir="/opt/share/vim"
else
install_vim="no"
fi
fi
if test "${install_vim}" = "yes"; then
AC_MSG_RESULT([$vimdir])
2004-03-06 07:18:57 -08:00
else
2004-03-06 09:20:04 -08:00
AC_MSG_RESULT([Not found, EDC syntax file will not be installed])
2004-03-06 07:18:57 -08:00
fi
2004-10-20 23:33:22 -07:00
EDJE_CC_PRG=""
EDJE_DECC_PRG=""
if test "x$have_edje_cc" = "xyes"; then
AM_CONDITIONAL(BUILD_EDJE_CC, true)
AM_CONDITIONAL(BUILD_EDJE_DECC, true)
EDJE_CC_PRG="edje_cc"
EDJE_DECC_PRG="edje_decc"
EDJE_RECC_PRG="edje_recc"
IMLIB2_CFLAGS=$imlib2_cflags
IMLIB2_LIBS=$imlib2_libs
else
AM_CONDITIONAL(BUILD_EDJE_CC, false)
AM_CONDITIONAL(BUILD_EDJE_DECC, false)
fi
AC_SUBST(EDJE_CC_PRG)
AC_SUBST(EDJE_DECC_PRG)
AC_SUBST(EDJE_RECC_PRG)
AC_SUBST(IMLIB2_CFLAGS)
AC_SUBST(IMLIB2_LIBS)
2004-03-06 07:18:57 -08:00
AC_SUBST(vimdir)
2003-06-02 16:49:56 -07:00
AC_OUTPUT([
2004-07-30 11:18:50 -07:00
edje.pc
2003-06-02 16:49:56 -07:00
Makefile
2004-05-12 13:14:18 -07:00
data/Makefile
data/images/Makefile
data/include/Makefile
data/src/Makefile
data/template/Makefile
data/template/embryo/Makefile
data/template/fonts/Makefile
data/template/hashes/Makefile
data/template/images/Makefile
data/template/macros/Makefile
data/template/parts/Makefile
data/template/programs/Makefile
data/test/Makefile
data/test/fonts/Makefile
data/test/images/Makefile
2003-06-02 16:49:56 -07:00
src/Makefile
src/lib/Makefile
src/bin/Makefile
edje-config
],[
chmod +x edje-config
touch edje_docs.tar.gz
])
2004-10-20 11:42:36 -07:00
if test "x$have_edje_cc" = "xyes"; then
if test "x$have_imlib2" = "xno"; then
echo
echo "WARNING: Building edje_cc without Imlib2 support!"
echo
fi
fi