efl/legacy/ecore/configure.in

701 lines
17 KiB
Plaintext

dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_ISC_POSIX
AM_INIT_AUTOMAKE(ecore, 0.9.9.037)
AM_CONFIG_HEADER(config.h)
AC_C_BIGENDIAN
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_C_CONST
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AM_ENABLE_SHARED
AM_PROG_LIBTOOL
AC_C___ATTRIBUTE__
if test "x${bindir}" = 'xNONE'; then
if test "x${prefix}" = "xNONE"; then
PACKAGE_BIN_DIR="${ac_default_prefix}/bin"
else
PACKAGE_BIN_DIR="${prefix}/bin"
fi
else
PACKAGE_BIN_DIR="${bindir}"
fi
AC_SUBST(PACKAGE_BIN_DIR)
if test "x${libdir}" = 'xNONE'; then
if test "x${prefix}" = "xNONE"; then
PACKAGE_LIB_DIR="${ac_default_prefix}/lib"
else
PACKAGE_LIB_DIR="${prefix}/lib"
fi
else
PACKAGE_LIB_DIR="${libdir}"
fi
AC_SUBST(PACKAGE_LIB_DIR)
if test "x${prefix}" = "xNONE"; then
PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}"
else
PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}"
fi
AC_SUBST(PACKAGE_DATA_DIR)
dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
changequote([,])dnl
# define pkg-config requirements for all our submodules.
# only the trivial requirements go here.
requirements_ecore_con=""
requirements_ecore_config=""
requirements_ecore_dbus=""
requirements_ecore_desktop=""
requirements_ecore_directfb=""
requirements_ecore_evas="evas"
requirements_ecore_fb=""
requirements_ecore_file=""
requirements_ecore_ipc=""
requirements_ecore_job=""
requirements_ecore_txt=""
requirements_ecore_x=""
dnl The first call to PKG_CHECK_MODULES is done conditionally,
dnl so we should include this here:
PKG_PROG_PKG_CONFIG
AC_CHECK_FUNCS(gettimeofday)
AC_CHECK_FUNCS(strlcpy)
AC_CHECK_HEADERS(netinet/in.h)
case "$host_os" in
mingw|mingw32)
winsock_libs="-lwsock32"
;;
esac
AC_SUBST(winsock_libs)
iconv_cflags=""
iconv_libs=""
have_iconv="no"
AC_ARG_WITH(iconv-link,
[ --with-iconv-link=ICONV_LINK explicitly specify an iconv link option],
[
iconv_libs=$withval
have_iconv="yes"
]
)
AC_MSG_CHECKING(for explicit iconv link options)
AC_MSG_RESULT($iconv_libs)
if test "x$have_iconv" = "xno" ; then
AC_CHECK_LIB(iconv, libiconv,
[
iconv_libs="-liconv"
have_iconv="yes"
]
)
if test "x$have_iconv" != "xyes"; then
AC_CHECK_LIB(iconv, iconv,
[
iconv_libs="-liconv"
have_iconv="yes"
]
)
fi
if test "x$have_ecore_txt" != "xyes"; then
AC_CHECK_LIB(c, libiconv,
[
have_iconv="yes"
]
)
fi
if test "x$have_ecore_txt" != "xyes"; then
AC_CHECK_LIB(c, iconv,
[
have_iconv="yes"
]
)
fi
fi
AC_SUBST(iconv_cflags)
AC_SUBST(iconv_libs)
ECORE_CHECK_MODULE([Txt], [yes], [$have_iconv],
[ecore_txt_libs="$ecore_txt_libs $iconv_libs"])
have_x="no"
x_dir="";
x_includes="";
x_cflags="";
x_libs="";
AC_PATH_XTRA
AC_CHECK_HEADER(X11/X.h,
[
have_x="yes"
x_dir=${x_dir:-/usr/X11R6}
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext"
]
)
AC_SUBST(x_cflags)
AC_SUBST(x_includes)
AC_SUBST(x_libs)
ECORE_CHECK_MODULE([X], [yes], [$have_x],
[ecore_x_libs="$ecore_x_libs $x_libs"])
if test "x$have_ecore_x" = "xyes"; then
Xcursor_libs=""
Xcursor_cflags=""
use_Xcursor="no"
PCFLAGS=$CFLAGS
CFLAGS=$x_cflags" "$x_includes
AC_CHECK_HEADER(X11/Xcursor/Xcursor.h,
[
AC_CHECK_LIB(Xcursor, XcursorImageLoadCursor,
[
AC_DEFINE(ECORE_XCURSOR, 1, [Build support for Xcursor])
Xcursor_cflags=""
Xcursor_libs="-lXcursor"
use_Xcursor="yes"
], [
Xcursor_cflags=""
Xcursor_libs=""
use_Xcursor="no"
], [
$x_libs -lXrender
]
)
], [
Xcursor_cflags=""
Xcursor_libs=""
use_Xcursor="no"
], [
#include <X11/Xlib.h>
]
)
CFLAGS=$PCFLAGS
AC_SUBST(Xcursor_cflags)
AC_SUBST(Xcursor_libs)
ECORE_CHECK_X_EXTENSION([Xdamage], [Xdamage.h], [Xdamage], [XDamageSubtract])
ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xdpms], [DPMSQueryExtension])
if test "x$use_xdpms" = "xno" ; then
ECORE_CHECK_X_EXTENSION([Xdpms], [dpms.h], [Xext], [DPMSQueryExtension])
fi
ECORE_CHECK_X_EXTENSION([Xfixes], [Xfixes.h], [Xfixes], [XFixesExpandRegion])
ECORE_CHECK_X_EXTENSION([Xinerama], [Xinerama.h], [Xinerama], [XineramaQueryScreens])
ECORE_CHECK_X_EXTENSION([Xprint], [Print.h], [Xp], [XpQueryScreens])
ECORE_CHECK_X_EXTENSION([Xrandr], [Xrandr.h], [Xrandr], [XRRSizes])
ECORE_CHECK_X_EXTENSION([Xrender], [Xrender.h], [Xrender], [XRenderFindVisualFormat])
ECORE_CHECK_X_EXTENSION([Xss], [scrnsaver.h], [Xss], [XScreenSaverSelectInput])
requirements_ecore_evas="$requirements_ecore_evas ecore-x"
fi
ECORE_CHECK_MODULE([Job], [yes])
PKG_CHECK_MODULES(DIRECTFB, directfb >= 0.9.16,
[ have_directfb="yes" ],
[ have_directfb="no" ]
)
ECORE_CHECK_MODULE([DirectFB], [yes], [$have_directfb],
[requirements_ecore_directfb="directfb"])
have_fb="no"
AC_CHECK_HEADER(linux/fb.h,
[
AC_CHECK_HEADER(linux/input.h, [ have_fb="yes" ])
]
)
ECORE_CHECK_MODULE([FB], [no], [$have_fb],
[requirements_ecore_evas="$requirements_ecore_evas ecore-fb"])
tslib_libs=""
if test "x$have_ecore_fb" = "xyes" ; then
AC_CHECK_HEADER(tslib.h,
[
tslib_libs="-ltslib"
AC_DEFINE(HAVE_TSLIB, 1, [Build Ecore_FB Touchscreen Code])
]
)
fi
AC_SUBST(tslib_libs)
PKG_CHECK_MODULES(EVAS, [evas >= 0.9.9],
[ have_evas="yes" ],
[ have_evas="no" ]
)
ECORE_CHECK_MODULE([Evas], [yes], [$have_evas])
have_ecore_evas_gl="no";
AC_ARG_ENABLE(ecore-evas-gl,
AC_HELP_STRING(
[--enable-ecore-evas-gl],
[disable GL support in the ecore_evas module. [[default=enabled]]]
), [
want_ecore_evas_gl=$enableval
], [
want_ecore_evas_gl=yes
]
)
AC_MSG_CHECKING(whether ecore_evas gl support is to be built)
AC_MSG_RESULT($want_ecore_evas_gl)
dnl GL support requires X support, so we should
dnl handle the case where our user is on crack
dnl i.e. user disables X but enables GL
PCFLAGS=$CFLAGS
CFLAGS="$EVAS_CFLAGS $CFLAGS"
if test "x$want_ecore_evas_gl" = "xyes" -a "x$have_ecore_x" = "xyes"; then
AC_CHECK_HEADER(Evas_Engine_GL_X11.h,
[
AC_DEFINE(BUILD_ECORE_EVAS_GL, 1, [Support for GL Engine in Ecore_Evas])
have_ecore_evas_gl="yes";
], [
dummy=no
], [
#include <Evas.h>
]
)
else
if test "x$want_ecore_evas_gl" = "xyes"; then
AC_MSG_WARN(Silly monkey: ecore_evas_gl requires ecore_x ... disabling ecore_evas_gl)
fi
fi
have_ecore_evas_xrender="no";
AC_ARG_ENABLE(ecore-evas-xrender,
AC_HELP_STRING(
[--enable-ecore-evas-xrender],
[disable XRender support in the ecore_evas module. [[default=enabled]]]
), [
want_ecore_evas_xrender=$enableval
], [
want_ecore_evas_xrender=yes
]
)
AC_MSG_CHECKING(whether ecore_evas xrender support is to be built)
AC_MSG_RESULT($want_ecore_evas_xrender)
dnl Xrender support requires X support, so we should
dnl handle the case where our user is on crack
dnl i.e. user disables X but enables Xrender
PCFLAGS=$CFLAGS
CFLAGS="$EVAS_CFLAGS $CFLAGS"
if test "x$want_ecore_evas_xrender" = "xyes" -a "x$have_ecore_x" = "xyes"; then
AC_CHECK_HEADER(Evas_Engine_XRender_X11.h,
[
AC_DEFINE(BUILD_ECORE_EVAS_XRENDER, 1, [Support for XRender Engine in Ecore_Evas])
have_ecore_evas_xrender="yes";
], [
dummy=no
], [
#include <Evas.h>
]
)
else
if test "x$want_ecore_evas_xrender" = "xyes"; then
AC_MSG_WARN(Silly monkey: ecore_evas_xrender requires ecore_x ... disabling ecore_evas_xrender)
fi
fi
AC_MSG_CHECKING(whether ecore_evas DirectFB support is to be built)
AC_ARG_ENABLE(ecore-evas-dfb,
[ --disable-ecore-evas-dfb disable DirectFB in the ecore_evas module],
[
if test "x$enableval" = "xno" ; then
want_ecore_evas_dfb=no
else
want_ecore_evas_dfb=yes
fi
], [
want_ecore_evas_dfb=maybe
]
)
AC_MSG_RESULT($want_ecore_evas_dfb)
have_ecore_evas_dfb="no"
if test "x$want_ecore_evas_dfb" != "xno" ; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $DIRECTFB_CFLAGS"
AC_CHECK_HEADER(Evas_Engine_DirectFB.h,
[
AC_DEFINE(BUILD_ECORE_EVAS_DIRECTFB, 1, [Support for DirectFB in Ecore_Evas])
have_ecore_evas_dfb="yes"
], [
if test "x$want_ecore_evas_dfb" = "xyes" ; then
AC_MSG_ERROR(DirectFB requested but support not found)
fi
], [
#include <Evas.h>
]
)
CFLAGS="$save_CFLAGS"
fi
want_ecore_evas_fb="no";
have_ecore_evas_fb="no";
AC_MSG_CHECKING(whether ecore_evas fb support is to be built)
AC_ARG_ENABLE(ecore-evas-fb,
[ --enable-ecore-evas-fb enable fb in the ecore_evas module],
[
if test x"$enableval" = x"yes" ; then
AC_MSG_RESULT(yes)
want_ecore_evas_fb="yes"
else
AC_MSG_RESULT(no)
fi
], [
AC_MSG_RESULT(no)
]
)
if test "x$want_ecore_evas_fb" = "xyes" -a "x$have_ecore_fb" = "xyes"; then
AC_CHECK_HEADER(Evas_Engine_FB.h,
[
AC_DEFINE(BUILD_ECORE_EVAS_FB, 1, [Support for Linux FB in Ecore_Evas])
have_ecore_evas_fb="yes"
], [
dummy=no
], [
#include <Evas.h>
]
)
fi
want_ecore_evas_buffer="yes";
have_ecore_evas_buffer="no";
AC_MSG_CHECKING(whether ecore_evas buffer support is to be built)
AC_ARG_ENABLE(ecore-evas-buffer,
[ --disable-ecore-evas-buffer disable buffer in the ecore_evas module],
[
if test x"$enableval" = x"yes" ; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
want_ecore_evas_buffer="no"
fi
], [
AC_MSG_RESULT(yes)
]
)
if test "x$want_ecore_evas_buffer" = "xyes"; then
AC_CHECK_HEADER(Evas_Engine_Buffer.h,
[
AC_DEFINE(BUILD_ECORE_EVAS_BUFFER, 1, [Support for Buffers in Ecore_Evas])
have_ecore_evas_buffer="yes"
], [
dummy=no
], [
#include <Evas.h>
]
)
fi
CFLAGS=$PCFLAGS
AC_ARG_ENABLE(openssl,
AC_HELP_STRING(
[--enable-openssl],
[enable openssl support @<:@default=auto@:>@]
),
[ use_openssl=$enableval ],
[ use_openssl=yes ]
)
if test "x$use_openssl" = "xyes"; then
PKG_CHECK_MODULES(SSL, openssl,
[
use_openssl=yes
AC_DEFINE(USE_OPENSSL, 1, [Use OpenSSL])
requirements_ecore_con="$requirements_ecore_con openssl"
# no need to add it to req_ecore_{ipc,dbus}, since they
# depends on ecore_con anyway.
],
[ use_openssl=no ]
)
fi
AC_ABSTRACT_SOCKET_TEST(
[AC_DEFINE(HAVE_ABSTRACT_SOCKETS, 1, [Have abstract socket namespace])],
[]
)
ECORE_CHECK_MODULE([Con], [yes])
ECORE_CHECK_MODULE([Ipc], [yes], [$have_ecore_con])
ECORE_CHECK_MODULE([DBus], [yes])
PKG_CHECK_MODULES(EET, [eet >= 0.9.10],
[ have_eet="yes" ],
[ have_eet="no" ]
)
ECORE_CHECK_MODULE([Config], [yes], [$have_eet],
[requirements_ecore_config="$requirements_ecore_config eet"])
ECORE_CHECK_MODULE([File], [yes])
use_fam="no"
use_inotify="yes"
use_poll="yes"
use_curl="yes"
if test "x$have_ecore_file" = "xyes"; then
dnl We need to check if the right inotify version is accessible
AC_MSG_CHECKING(whether inotify is to be used for filemonitoring)
AC_ARG_ENABLE(inotify,
[ --disable-inotify disable inotify in the ecore_file module],
[
if test "$enableval" = "yes"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
use_inotify="no"
fi
], [
AC_MSG_RESULT(yes)
]
)
dnl It's hard to find a good test on how to check the correct
dnl inotify version. They changed the headers a lot.
dnl in kernel 2.6.13 __NR_inotify_init was added to the defined syscalls
dnl in asm/unistd.h and IN_MOVE_SELF was added to linux/inotify.h
dnl so with this check you need a very new kernel and kernel-headers!
if test "x$use_inotify" = "xyes"; then
AC_CHECK_LIB(c, inotify_init, [
AC_TRY_COMPILE(
[
#include <asm/unistd.h>
#include <linux/inotify.h>
],
[ int a = IN_MOVE_SELF; void *f = inotify_init(); ],
[
AC_DEFINE(HAVE_INOTIFY, 1, [ File monitoring with Inotify ])
], [
AC_TRY_COMPILE(
[
#include <sys/inotify.h>
],
[ int a = IN_MOVE_SELF; void *f = inotify_nit(); ],
[
AC_DEFINE(HAVE_INOTIFY, 1, [ File monitoring with Inotify ])
AC_DEFINE(HAVE_SYS_INOTIFY, 1, [ File monitoring with Inotify - sys/inotify.h ])
], [
use_inotify="no"
]
)
]
)
],[
use_inotify="no"
])
fi
#AC_MSG_CHECKING(whether FAM is to be used for filemonitoring)
#AC_ARG_ENABLE(fam,
# [ --enable-fam enable fam in the ecore_file module],
# [
# if test "$enableval" = "yes"; then
# AC_MSG_RESULT(yes)
# use_fam="yes"
# else
# AC_MSG_RESULT(no)
# fi
# ], [
# AC_MSG_RESULT(no)
# ]
#)
fam_libs=""
#if test "x$use_fam" = "xyes"; then
# AC_CHECK_LIB(fam, FAMOpen,
# [
# AC_DEFINE(HAVE_FAM, 1, [ File monitoring with FAM ])
# fam_libs="-lfam"
# ecore_file_libs="$ecore_file_libs $fam_libs"
# ], [
# use_fam="no"
# ]
# )
#fi
AC_MSG_CHECKING(whether polling is to be used for filemonitoring)
AC_ARG_ENABLE(poll,
[ --disable-poll disable poll in the ecore_file module],
[
if test "$enableval" = "yes"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
use_poll="no"
fi
], [
AC_MSG_RESULT(yes)
]
)
if test "x$use_poll" = "xyes"; then
AC_DEFINE(HAVE_POLL, 1, [ File monitoring with polling ])
fi
use_curl="yes"
AC_MSG_CHECKING(whether CURL is to be used for file download)
AC_ARG_ENABLE(curl,
[ --disable-curl disable curl in the ecore_file module],
[
if test "$enableval" = "yes"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
use_curl="no"
fi
], [
AC_MSG_RESULT(yes)
]
)
if test "x$use_curl" = "xyes"; then
PKG_CHECK_MODULES(CURL, libcurl,
[
AC_DEFINE(HAVE_CURL, 1, [ Downloading with CURL ])
ecore_file_libs="$ecore_file_libs $CURL_LIBS"
requirements_ecore_file="$requirements_ecore_file libcurl"
], [
use_curl="no"
]
)
fi
fi
AC_SUBST(fam_libs)
ECORE_CHECK_MODULE([Desktop], [yes], [$have_ecore_file],
[requirements_ecore_desktop="ecore-file"])
AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
AC_SUBST(dlopen_libs)
dnl Checking for Perl:
AC_PATH_PROG(PERL,perl,0)
AC_SUBST(PERL)
AC_SUBST(requirements_ecore_con)
AC_SUBST(requirements_ecore_config)
AC_SUBST(requirements_ecore_dbus)
AC_SUBST(requirements_ecore_desktop)
AC_SUBST(requirements_ecore_directfb)
AC_SUBST(requirements_ecore_evas)
AC_SUBST(requirements_ecore_fb)
AC_SUBST(requirements_ecore_file)
AC_SUBST(requirements_ecore_ipc)
AC_SUBST(requirements_ecore_job)
AC_SUBST(requirements_ecore_txt)
AC_SUBST(requirements_ecore_x)
# set up conditionals
AM_CONDITIONAL(BUILD_ECORE_EVAS_GL, test $have_ecore_evas_gl = yes)
AM_CONDITIONAL(BUILD_ECORE_EVAS_XRENDER, test $have_ecore_evas_xrender = yes)
AM_CONDITIONAL(BUILD_ECORE_EVAS_DIRECTFB, test $have_ecore_evas_dfb = yes)
AM_CONDITIONAL(BUILD_ECORE_EVAS_FB, test $have_ecore_evas_fb = yes)
AM_CONDITIONAL(BUILD_ECORE_EVAS_BUFFER, test $have_ecore_evas_buffer = yes)
AC_OUTPUT([
Makefile
ecore-con.pc
ecore-config.pc
ecore-dbus.pc
ecore-desktop.pc
ecore-directfb.pc
ecore-evas.pc
ecore-fb.pc
ecore-file.pc
ecore-ipc.pc
ecore-job.pc
ecore-txt.pc
ecore-x.pc
ecore.pc
src/Makefile
src/bin/Makefile
src/lib/Makefile
src/lib/ecore/Makefile
src/lib/ecore_job/Makefile
src/lib/ecore_x/Makefile
src/lib/ecore_fb/Makefile
src/lib/ecore_evas/Makefile
src/lib/ecore_con/Makefile
src/lib/ecore_ipc/Makefile
src/lib/ecore_txt/Makefile
src/lib/ecore_config/Makefile
src/lib/ecore_file/Makefile
src/lib/ecore_dbus/Makefile
src/lib/ecore_desktop/Makefile
src/lib/ecore_directfb/Makefile
ecore-config
README
ecore.spec
debian/changelog
],[
chmod +x ecore-config
])
echo
echo "$PACKAGE $VERSION"
echo
echo "Optional Modules:"
echo
echo " Ecore_Job....................: $have_ecore_job"
echo " Ecore_Con....................: $have_ecore_con (OpenSSL: $use_openssl)"
echo " Ecore_Txt....................: $have_ecore_txt"
echo " Ecore_X......................: $have_ecore_x (Xcursor: $use_Xcursor) (Xprint: $use_xprint) (Xinerama: $use_xinerama) (Xrandr: $use_xrandr) (Xscreensaver: $use_xss) (Xrender: $use_xrender) (Xfixes: $use_xfixes) (Xdamage: $use_xdamage) (Xdpms: $use_xdpms)"
echo " Ecore_FB.....................: $have_ecore_fb"
echo " Ecore_DFB....................: $have_ecore_directfb"
echo " Ecore_Evas...................: $have_ecore_evas"
echo " Ecore_Evas GL Support........: $have_ecore_evas_gl"
echo " Ecore_Evas XRender Support...: $have_ecore_evas_xrender"
echo " Ecore_Evas FB Support........: $have_ecore_evas_fb"
echo " Ecore_Evas DFB Support.......: $have_ecore_evas_dfb"
echo " Ecore_Evas Buffer Support....: $have_ecore_evas_buffer"
echo " Ecore_Ipc....................: $have_ecore_ipc (OpenSSL: $use_openssl)"
echo " Ecore_Config.................: $have_ecore_config"
echo " Ecore_DBUS...................: $have_ecore_dbus"
echo " Ecore_Desktop................: $have_ecore_desktop"
#echo " Ecore_File...................: $have_ecore_file (Inotify: $use_inotify) (FAM: $use_fam) (Poll: $use_poll)"
echo " Ecore_File...................: $have_ecore_file (Inotify: $use_inotify) (Poll: $use_poll) (CURL: $use_curl)"
echo
echo "Now type 'make' ('gmake' on some systems) to compile $PACKAGE."
echo