forked from enlightenment/efl
276 lines
6.8 KiB
Plaintext
276 lines
6.8 KiB
Plaintext
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)
|
|
AC_CANONICAL_BUILD
|
|
AC_CANONICAL_HOST
|
|
AC_CANONICAL_TARGET
|
|
AC_ISC_POSIX
|
|
AM_INIT_AUTOMAKE(edje, 0.0.1)
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
AC_PROG_CC
|
|
AM_PROG_CC_STDC
|
|
AC_HEADER_STDC
|
|
AC_C_CONST
|
|
AM_ENABLE_SHARED
|
|
AM_PROG_LIBTOOL
|
|
|
|
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
|
|
|
|
dnl Set PACKAGE_DATA_DIR in config.h.
|
|
if test "x${datadir}" = 'x${prefix}/share'; then
|
|
if test "x${prefix}" = "xNONE"; then
|
|
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", [Shared data directory])
|
|
else
|
|
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", [Shared data directory])
|
|
fi
|
|
else
|
|
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}", [Shared data directory])
|
|
fi
|
|
|
|
dnl Set PACKAGE_BIN_DIR in config.h.
|
|
if test "x${bindir}" = 'xNONE'; then
|
|
if test "x${prefix}" = "xNONE"; then
|
|
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${ac_default_prefix}/bin", [Installation directory for user executables])
|
|
else
|
|
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${prefix}/bin", [Installation directory for user executables])
|
|
fi
|
|
else
|
|
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${bindir}", [Installation directory for user executables])
|
|
fi
|
|
|
|
dnl Set PACKAGE_LIB_DIR in config.h.
|
|
if test "x${libdir}" = 'xNONE'; then
|
|
if test "x${prefix}" = "xNONE"; then
|
|
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${ac_default_prefix}/lib", [Installation directory for libraries])
|
|
else
|
|
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${prefix}/lib", [Installation directory for libraries])
|
|
fi
|
|
else
|
|
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${libdir}", [Installation directory for libraries])
|
|
fi
|
|
|
|
dnl Set PACKAGE_SOURCE_DIR in config.h.
|
|
packagesrcdir=`cd $srcdir && pwd`
|
|
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Source code directory])
|
|
|
|
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)
|
|
|
|
EDJE_CC_PRG=""
|
|
if test "x$have_edje_cc" = "xyes"; then
|
|
AM_CONDITIONAL(BUILD_EDJE_CC, true)
|
|
EDJE_CC_PRG="edje_cc"
|
|
else
|
|
AM_CONDITIONAL(BUILD_EDJE_CC, false)
|
|
fi
|
|
AC_SUBST(EDJE_CC_PRG)
|
|
|
|
AC_ARG_WITH(eet,
|
|
[ --with-eet=DIR use eet in <DIR>],
|
|
[CFLAGS="$CFLAGS -I$withval/include"
|
|
LIBS="-L$withval/lib $LIBS"])
|
|
|
|
have_eet="no";
|
|
AC_CHECK_HEADER(Eet.h,
|
|
[ have_eet="yes" ],
|
|
[ have_eet="no" ]
|
|
)
|
|
|
|
if test "x$have_eet" = "xyes"; then
|
|
if [ test -z "$EET_CONFIG" ]; then EET_CONFIG="eet-config"; fi
|
|
eet_cflags=`$EET_CONFIG --cflags`
|
|
eet_libs=`$EET_CONFIG --libs`
|
|
else
|
|
AC_MSG_ERROR(Cannot find Eet.h)
|
|
exit -1
|
|
fi
|
|
|
|
AC_SUBST(eet_cflags)
|
|
AC_SUBST(eet_libs)
|
|
|
|
have_embryo="no";
|
|
AC_CHECK_HEADER(Embryo.h,
|
|
[ have_embryo="yes" ],
|
|
[ have_embryo="no" ]
|
|
)
|
|
|
|
if test "x$have_embryo" = "xyes"; then
|
|
if [ test -z "$EMBRYO_CONFIG" ]; then EMBRYO_CONFIG="embryo-config"; fi
|
|
embryo_cflags=`$EMBRYO_CONFIG --cflags`
|
|
embryo_libs=`$EMBRYO_CONFIG --libs`
|
|
else
|
|
AC_MSG_ERROR(Cannot find Embryo.h)
|
|
exit -1
|
|
fi
|
|
|
|
AC_SUBST(embryo_cflags)
|
|
AC_SUBST(embryo_libs)
|
|
|
|
imlib2_cflags=""
|
|
imlib2_libs=""
|
|
if test "x$have_edje_cc" = "xyes"; then
|
|
AC_ARG_WITH(imlib2,
|
|
[ --with-imlib2=DIR use imlib2 in <DIR>],
|
|
[CFLAGS="$CFLAGS -I$withval/include"
|
|
LIBS="-L$withval/lib $LIBS"])
|
|
|
|
AC_PATH_GENERIC(imlib2, , [
|
|
AC_SUBST(imlib2_libs)
|
|
AC_SUBST(imlib2_cflags)],
|
|
AC_MSG_ERROR(Cannot find imlib2: Is imlib2-config in path?))
|
|
imlib2_libs=`imlib2-config --libs`
|
|
imlib2_cflags=`imlib2-config --cflags`
|
|
fi
|
|
AC_SUBST(imlib2_cflags)
|
|
AC_SUBST(imlib2_libs)
|
|
|
|
AC_ARG_WITH(evas,
|
|
[ --with-evas=DIR use evas in <DIR>],
|
|
[CFLAGS="$CFLAGS -I$withval/include"
|
|
LIBS="-L$withval/lib $LIBS"])
|
|
|
|
AC_PATH_GENERIC(evas, , [
|
|
AC_SUBST(evas_libs)
|
|
AC_SUBST(evas_cflags)],
|
|
AC_MSG_ERROR(Cannot find evas: Is evas-config in path?))
|
|
|
|
if [ test -z "$EVAS_CONFIG" ]; then EVAS_CONFIG="evas-config"; fi
|
|
evas_cflags=`$EVAS_CONFIG --cflags`
|
|
evas_libs=`$EVAS_CONFIG --libs`
|
|
|
|
AC_SUBST(evas_cflags)
|
|
AC_SUBST(evas_libs)
|
|
|
|
AC_CHECK_HEADERS(Evas_Engine_Software_X11.h, [], [], [
|
|
#include <Evas.h>
|
|
])
|
|
|
|
AC_CHECK_HEADERS(Evas_Engine_GL_X11.h, [], [], [
|
|
#include <Evas.h>
|
|
])
|
|
|
|
AC_CHECK_HEADERS(Evas_Engine_FB.h, [], [], [
|
|
#include <Evas.h>
|
|
])
|
|
|
|
AC_ARG_WITH(ecore,
|
|
[ --with-ecore=DIR use ecore in <DIR>],
|
|
[CFLAGS="$CFLAGS -I$withval/include"
|
|
LIBS="-L$withval/lib $LIBS"])
|
|
|
|
AC_PATH_GENERIC(ecore, , [
|
|
AC_SUBST(ecore_libs)
|
|
AC_SUBST(ecore_cflags)],
|
|
AC_MSG_ERROR(Cannot find ecore: Is ecore-config in path?))
|
|
|
|
if [ test -z "$ECORE_CONFIG" ]; then ECORE_CONFIG="ecore-config"; fi
|
|
ecore_cflags=`$ECORE_CONFIG --cflags`
|
|
ecore_libs=`$ECORE_CONFIG --libs`
|
|
|
|
AC_SUBST(ecore_cflags)
|
|
AC_SUBST(ecore_libs)
|
|
|
|
AC_MSG_CHECKING([for location of Vim data files])
|
|
install_vim="yes";
|
|
AC_ARG_WITH(vim,
|
|
[ --with-vim=DIR Location of Vim data files (PREFIX/share/vim)],
|
|
[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])
|
|
else
|
|
AC_MSG_RESULT([Not found, EDC syntax file will not be installed])
|
|
fi
|
|
|
|
AC_SUBST(vimdir)
|
|
|
|
AC_OUTPUT([
|
|
Makefile
|
|
src/Makefile
|
|
src/lib/Makefile
|
|
src/bin/Makefile
|
|
edje-config
|
|
],[
|
|
chmod +x edje-config
|
|
touch edje_docs.tar.gz
|
|
])
|