2006-08-20 22:43:09 +04:00
|
|
|
dnl
|
|
|
|
dnl $Id: configure.in 1719 2006-08-15 08:56:42Z karijes $
|
|
|
|
dnl
|
|
|
|
dnl Part of Equinox Desktop Environment (EDE).
|
2012-05-16 12:15:49 +04:00
|
|
|
dnl Copyright (c) 2000-2012 EDE Authors.
|
2006-08-20 22:43:09 +04:00
|
|
|
dnl
|
|
|
|
dnl This program is licenced under terms of the
|
|
|
|
dnl GNU General Public Licence version 2 or newer.
|
|
|
|
dnl See COPYING for details.
|
|
|
|
|
2008-08-25 17:21:54 +04:00
|
|
|
m4_define([ede_major_version], [2])
|
2012-05-21 15:29:25 +04:00
|
|
|
m4_define([ede_minor_version], [1])
|
2008-08-25 17:21:54 +04:00
|
|
|
m4_define([ede_patch_version], [0])
|
|
|
|
m4_define([ede_version], [ede_major_version.ede_minor_version.ede_patch_version])
|
2006-08-20 22:43:09 +04:00
|
|
|
|
2008-08-25 17:21:54 +04:00
|
|
|
AC_PREREQ(2.13)
|
2008-08-25 17:51:38 +04:00
|
|
|
AC_INIT(EDE, ede_version, [karijes@users.sourceforge.net])
|
2007-03-17 14:28:25 +03:00
|
|
|
AC_CONFIG_SRCDIR(COPYING)
|
2009-01-20 16:26:33 +03:00
|
|
|
AC_CONFIG_HEADER(config.h:config.h.in)
|
2006-08-20 22:43:09 +04:00
|
|
|
|
2008-08-25 17:21:54 +04:00
|
|
|
dnl PACKAGE_VERSION is filled from AC_INIT
|
2006-08-20 22:43:09 +04:00
|
|
|
EDE_VERSION=$PACKAGE_VERSION
|
|
|
|
|
|
|
|
if test "$prefix" = NONE; then
|
2009-01-23 18:10:55 +03:00
|
|
|
EDE_INSTALL_DIR="/usr/local"
|
2006-08-20 22:43:09 +04:00
|
|
|
else
|
2008-08-25 17:21:54 +04:00
|
|
|
EDE_INSTALL_DIR="$prefix"
|
2006-08-20 22:43:09 +04:00
|
|
|
fi
|
2008-08-25 17:21:54 +04:00
|
|
|
AC_DEFINE_UNQUOTED(PREFIX, "$EDE_INSTALL_DIR", [Default installation place])
|
|
|
|
|
|
|
|
EDE_OPTIM_FLAGS=""
|
|
|
|
EDE_DEBUG_FLAGS=""
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [turn on debugging support (default=no)]),, enable_debug=no)
|
|
|
|
AC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile], [turn on profiling support (default=no)]),, enable_profile=no)
|
|
|
|
AC_ARG_ENABLE(shape, AC_HELP_STRING([--enable-shape], [enable XShape extension (default=yes)]),, enable_shape=yes)
|
|
|
|
AC_ARG_ENABLE(composite, AC_HELP_STRING([--enable-composite], [enable XComposite extension (default=yes)]),, enable_composite=yes)
|
2009-01-14 18:10:47 +03:00
|
|
|
AC_ARG_ENABLE(hal, AC_HELP_STRING([--enable-hal], [enable HAL support (default=yes)]),, enable_hal=yes)
|
2006-08-20 22:43:09 +04:00
|
|
|
|
2009-04-02 00:18:18 +04:00
|
|
|
dnl set 'with_fltk_path'
|
|
|
|
AC_ARG_WITH(fltk_path, AC_HELP_STRING([--with-fltk-path=[DIR]], [alternative directory where FLTK is installed]))
|
2009-04-10 20:03:00 +04:00
|
|
|
dnl set 'with_edelib_path'
|
|
|
|
AC_ARG_WITH(edelib_path, AC_HELP_STRING([--with-edelib-path=[DIR]], [alternative directory where edelib is installed]))
|
2009-04-02 00:18:18 +04:00
|
|
|
|
2007-03-17 14:28:25 +03:00
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CPP
|
2008-08-25 17:21:54 +04:00
|
|
|
EDE_PROG_JAM
|
|
|
|
|
2007-03-17 14:28:25 +03:00
|
|
|
AC_PATH_PROG(MSGFMT, msgfmt)
|
|
|
|
AC_PATH_PROG(XGETTEXT, xgettext)
|
2007-03-22 20:14:54 +03:00
|
|
|
AC_PATH_PROG(GDB, gdb)
|
2008-08-25 17:21:54 +04:00
|
|
|
AC_PATH_PROG(PYTHON, python)
|
2007-03-22 20:14:54 +03:00
|
|
|
|
2009-04-02 00:18:18 +04:00
|
|
|
dnl X_CFLAGS, X_PRE_LIBS, X_LIBS, X_EXTRA_LIBS are replaced iff are X on nonstandard paths
|
2008-08-25 17:21:54 +04:00
|
|
|
AC_PATH_XTRA
|
2006-08-20 22:43:09 +04:00
|
|
|
|
2007-03-17 14:28:25 +03:00
|
|
|
AC_HEADER_STDC
|
2008-08-25 17:21:54 +04:00
|
|
|
|
2012-09-24 17:43:51 +04:00
|
|
|
dnl for xmlrpc-c
|
|
|
|
AC_CHECK_FUNC(pselect, AC_DEFINE(HAVE_PSELECT, 1, [Define to 1 if you have pselect()]))
|
|
|
|
AC_CHECK_FUNC(setgroups, AC_DEFINE(HAVE_SETGROUPS, 1, [Define to 1 if you have setgroups()]))
|
|
|
|
AC_CHECK_FUNC(asprintf, AC_DEFINE(HAVE_ASPRINTF, 1, [Define to 1 if you have asprintf()]))
|
|
|
|
AC_CHECK_FUNC(setenv, AC_DEFINE(HAVE_SETENV, 1, [Define to 1 if you have setenv()]))
|
|
|
|
AC_CHECK_FUNC(wcsncmp, AC_DEFINE(HAVE_WCSNCMP, 1, [Define to 1 if you have wcsncmp()]))
|
|
|
|
AC_CHECK_FUNC(gettimeofday, AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Define to 1 if you have gettimeofday()]))
|
|
|
|
AC_CHECK_FUNC(localtime_r, AC_DEFINE(HAVE_LOCALTIME_R, 1, [Define to 1 if you have localtime_r()]))
|
|
|
|
AC_CHECK_FUNC(gmtime_r, AC_DEFINE(HAVE_GMTIME_R, 1, [Define to 1 if you have gmtime_r()]))
|
|
|
|
AC_CHECK_FUNC(strcasecmp, AC_DEFINE(HAVE_STRCASECMP, 1, [Define to 1 if you have strcasecmp()]))
|
|
|
|
|
2008-08-25 17:21:54 +04:00
|
|
|
if test "$enable_profile" = "yes"; then
|
|
|
|
enable_debug=yes
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$enable_debug" = "yes"; then
|
|
|
|
EDE_DEBUG_FLAGS="$EDE_DEBUG_FLAGS -g3 -D_DEBUG -DDEBUG"
|
|
|
|
EDE_OPTIM_FLAGS=""
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$enable_profile" = "yes"; then
|
|
|
|
EDE_DEBUG_FLAGS="$EDE_DEBUG_FLAGS -pg"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$enable_shape" = "yes"; then
|
|
|
|
AC_CHECK_HEADER(X11/extensions/shape.h, [have_xshape_h=yes],)
|
|
|
|
|
|
|
|
if test "$have_xshape_h" = "yes"; then
|
|
|
|
AC_CHECK_LIB(Xext, XShapeInputSelected, [have_xshape=yes],,$X_LIBS)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$have_xshape" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_SHAPE, 1, [Define to 1 if you have XShape extension])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$enable_composite" = "yes"; then
|
2009-03-03 14:47:30 +03:00
|
|
|
PKG_CHECK_MODULES(COMPOSITE, [xcomposite, xdamage, xext], [have_xcomposite=yes], [have_composite=no])
|
2008-08-25 17:21:54 +04:00
|
|
|
|
|
|
|
if test "$have_xcomposite" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_COMPOSITE, 1, [Define to 1 if you have Xcomposite extension])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$enable_hal" = "yes"; then
|
2009-03-03 14:47:30 +03:00
|
|
|
PKG_CHECK_MODULES(HAL, [hal, hal-storage], [have_hal=yes], [have_hal=no])
|
2008-08-25 17:21:54 +04:00
|
|
|
|
|
|
|
if test "$have_hal" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_HAL, 1, [Define to 1 if you have HAL libraries])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2009-03-06 15:12:27 +03:00
|
|
|
PKG_CHECK_MODULES(LIBSTARTUP_NOTIFICATION, [libstartup-notification-1.0],
|
|
|
|
[have_libstartup_notification=yes], [have_libstartup_notification=no])
|
|
|
|
if test "$have_libstartup_notification" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_LIBSTARTUP_NOTIFICATION, 1, [Define to 1 if you have libstartup-notification libraries])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
|
2009-04-10 20:03:00 +04:00
|
|
|
if test -n "$with_edelib_path"; then
|
2012-09-18 21:49:48 +04:00
|
|
|
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$with_edelib_path/lib/pkgconfig"
|
2009-04-10 20:03:00 +04:00
|
|
|
fi
|
|
|
|
|
2008-08-25 17:21:54 +04:00
|
|
|
PKG_CHECK_MODULES(EDELIB, [edelib],, [have_edelib=no])
|
|
|
|
if test "$have_edelib" = "no"; then
|
|
|
|
AC_MSG_ERROR(edelib not found! You must install it first)
|
|
|
|
fi
|
|
|
|
|
2009-05-14 20:06:10 +04:00
|
|
|
PKG_CHECK_MODULES(EDELIB_GUI, [edelib-gui],, [have_edelib_gui=no])
|
|
|
|
if test "$have_edelib_gui" = "no"; then
|
|
|
|
AC_MSG_ERROR(edelib-gui not found! You must install it first)
|
|
|
|
fi
|
|
|
|
|
2011-11-21 18:09:18 +04:00
|
|
|
PKG_CHECK_MODULES(EDELIB_GUI_NO_IMAGES, [edelib-gui-no-images],, [have_edelib_gui_no_images=no])
|
|
|
|
if test "$have_edelib_gui_no_images" = "no"; then
|
|
|
|
AC_MSG_ERROR(edelib-gui (without images) not found! You must install it first)
|
|
|
|
fi
|
|
|
|
|
2008-08-25 17:21:54 +04:00
|
|
|
PKG_CHECK_MODULES(EDELIB_DBUS, [edelib-dbus],, [have_edelib_dbus=no])
|
|
|
|
if test "$have_edelib_dbus" = "no"; then
|
2012-09-18 21:49:48 +04:00
|
|
|
AC_MSG_RESULT(edelib is compiled without DBus so EDE will be compiled without DBus support)
|
2008-08-25 17:21:54 +04:00
|
|
|
fi
|
|
|
|
|
2009-03-25 19:11:18 +03:00
|
|
|
dnl find edelib documentation
|
|
|
|
EDELIB_API_INDEX=`$PKG_CONFIG --variable=edelibdocdir edelib`
|
|
|
|
EDELIB_API_INDEX="$EDELIB_API_INDEX/html/index.html"
|
|
|
|
|
2009-04-02 00:18:18 +04:00
|
|
|
if test "x$with_fltk_path" = "x"; then
|
|
|
|
AC_PATH_PROG(FLTK_CONFIG, fltk-config)
|
|
|
|
else
|
|
|
|
AC_PATH_PROG(FLTK_CONFIG, fltk-config,, "$with_fltk_path/bin")
|
|
|
|
fi
|
|
|
|
|
2008-08-25 17:21:54 +04:00
|
|
|
if test -n "$FLTK_CONFIG"; then
|
|
|
|
fltk_version=`$FLTK_CONFIG --version`
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for FLTK version >= 1.1.7])
|
|
|
|
|
|
|
|
case "$fltk_version" in ["1.1."[789]])
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
;;
|
2009-10-08 16:13:52 +04:00
|
|
|
["1.1.10"])
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
;;
|
|
|
|
dnl check for FLTK 1.3.x branch
|
2011-08-04 12:46:05 +04:00
|
|
|
["1.3."[0123456789]])
|
|
|
|
AC_MSG_RESULT(yes)
|
2009-10-08 16:13:52 +04:00
|
|
|
;;
|
|
|
|
*)
|
2008-08-25 17:21:54 +04:00
|
|
|
AC_MSG_ERROR([Looks like you have an older FLTK version ($fltk_version). Required is >= 1.1.7])
|
|
|
|
esac
|
|
|
|
|
2009-10-05 16:10:50 +04:00
|
|
|
dnl remove -Wno-non-virtual-dtor from flags (also, on NetBSD they added -O2 flag; stupid)
|
|
|
|
FLTK_CFLAGS=`$FLTK_CONFIG --cxxflags | sed -e 's/-Wno-non-virtual-dtor//' | sed -e 's/-O[1-3]//g'`
|
2008-08-25 17:21:54 +04:00
|
|
|
dnl remove -lsupc++ so we can chose what to use
|
|
|
|
FLTK_LIBS_NOIMAGES=`$FLTK_CONFIG --ldflags | sed -e 's/-lsupc++//g'`
|
|
|
|
FLTK_LIBS=`$FLTK_CONFIG --use-images --ldflags | sed -e 's/-lsupc++//g'`
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([You don't have FLTK installed. To compile EDE, you will need it.])
|
|
|
|
fi
|
|
|
|
|
2009-01-14 18:41:49 +03:00
|
|
|
EDE_CHECK_LIBXPM
|
|
|
|
if test "$have_libxpm" = "yes"; then
|
|
|
|
FLTK_LIBS="$FLTK_LIBS $LIBXPM_LIBS"
|
|
|
|
FLTK_LIBS_NOIMAGES="$FLTK_LIBS_NOIMAGES $LIBXPM_LIBS"
|
|
|
|
fi
|
|
|
|
|
2009-01-26 16:41:28 +03:00
|
|
|
EDE_CHECK_STATFS
|
2009-10-07 14:25:15 +04:00
|
|
|
EDE_LARGEFILE
|
2009-01-26 16:41:28 +03:00
|
|
|
|
2009-06-25 19:37:12 +04:00
|
|
|
AC_PATH_PROG(CURL_CONFIG, curl-config)
|
|
|
|
if test -n "$CURL_CONFIG"; then
|
|
|
|
CURL_CFLAGS=`$CURL_CONFIG --cflags`
|
|
|
|
CURL_LIBS=`$CURL_CONFIG --libs`
|
|
|
|
AC_DEFINE(HAVE_CURL, 1, [Define to 1 if you have curl library])
|
2012-05-16 12:15:49 +04:00
|
|
|
|
|
|
|
AC_LANG_SAVE
|
|
|
|
AC_LANG_C
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <curl/curl.h>
|
|
|
|
#include <curl/types.h>
|
|
|
|
],[
|
|
|
|
CURL *curl;
|
|
|
|
curl = curl_easy_init();
|
|
|
|
],[have_curltypes_h=yes],[])
|
|
|
|
AC_LANG_RESTORE
|
|
|
|
|
|
|
|
if test "$have_curltype_h" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_CURLTYPES_H, 1, [Define to 1 if you have curl/types.h file])
|
|
|
|
fi
|
2009-06-25 19:37:12 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
dnl emits PTHREAD_CFLAGS and PTHREAD_LIBS
|
|
|
|
ACX_PTHREAD
|
|
|
|
|
2009-11-20 20:08:29 +03:00
|
|
|
AC_MSG_CHECKING([for XKB extension files])
|
|
|
|
ac_save_CFLAGS="$CFLAGS"
|
|
|
|
ac_save_LIBS="$LIBS"
|
|
|
|
CFLAGS="$CFLAGS $X_CFLAGS"
|
|
|
|
LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lxkbfile"
|
|
|
|
|
|
|
|
AC_LANG_SAVE
|
|
|
|
AC_LANG_C
|
|
|
|
AC_TRY_LINK([
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <X11/XKBlib.h>
|
|
|
|
#include <X11/extensions/XKBrules.h>
|
|
|
|
],[
|
|
|
|
FILE *fd = fopen("/some/file", "r");
|
|
|
|
XkbRF_RulesPtr ptr;
|
|
|
|
XkbRF_LoadRules(fd, ptr);
|
|
|
|
],[have_xkbrules=yes],[])
|
|
|
|
AC_LANG_RESTORE
|
|
|
|
|
2011-10-23 04:10:40 +04:00
|
|
|
CFLAGS="$ac_save_CFLAGS"
|
|
|
|
LIBS="$ac_save_LIBS"
|
2009-11-20 20:08:29 +03:00
|
|
|
|
|
|
|
if test "$have_xkbrules" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_XKBRULES, 1, [Define to 1 if you have XKB extension])
|
|
|
|
XKB_LIBS="$X_LIBS -lxkbfile"
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
|
2010-03-06 20:28:21 +03:00
|
|
|
dnl this check is stolen from xmlrpc-c which is borrowed from Python 1.5.2.
|
|
|
|
AC_MSG_CHECKING([whether va_list is an array])
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <stdarg.h>
|
|
|
|
],[
|
|
|
|
va_list list1, list2; list1 = list2;
|
|
|
|
],, va_list_is_array=yes)
|
|
|
|
|
|
|
|
if test "x$va_list_is_array" = "xyes"; then
|
|
|
|
AC_DEFINE(VA_LIST_IS_ARRAY, 1, [Define to 1 if your va_list is array])
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
|
2011-10-23 04:10:40 +04:00
|
|
|
dnl pekwm specific macros
|
|
|
|
EDE_CHECK_PEKWM_DEPENDENCIES
|
|
|
|
|
2010-01-19 17:41:51 +03:00
|
|
|
dnl expand variables before EDE_INIT_JAM convert them to jam variables
|
|
|
|
EDE_EXPAND(sysconfdir, "NONE", my_sysconfdir)
|
|
|
|
|
2008-08-25 17:21:54 +04:00
|
|
|
EDE_INIT_JAM
|
|
|
|
|
|
|
|
AC_SUBST(EDE_VERSION)
|
|
|
|
AC_SUBST(EDE_OPTIM_FLAGS)
|
|
|
|
AC_SUBST(EDE_DEBUG_FLAGS)
|
|
|
|
AC_SUBST(FLTK_CFLAGS)
|
|
|
|
AC_SUBST(FLTK_LIBS)
|
|
|
|
AC_SUBST(FLTK_LIBS_NOIMAGES)
|
2009-03-25 19:11:18 +03:00
|
|
|
AC_SUBST(EDELIB_API_INDEX)
|
2009-06-25 19:37:12 +04:00
|
|
|
AC_SUBST(CURL_CFLAGS)
|
|
|
|
AC_SUBST(CURL_LIBS)
|
2009-10-07 14:25:15 +04:00
|
|
|
AC_SUBST(LARGEFILE)
|
2009-11-20 20:08:29 +03:00
|
|
|
AC_SUBST(XKB_LIBS)
|
2010-01-19 17:41:51 +03:00
|
|
|
AC_SUBST(my_sysconfdir)
|
2011-10-23 04:10:40 +04:00
|
|
|
AC_SUBST(PEKWM_CXXFLAGS)
|
|
|
|
AC_SUBST(PEKWM_LIBS)
|
2008-08-25 17:21:54 +04:00
|
|
|
|
2008-08-25 19:40:37 +04:00
|
|
|
AC_OUTPUT([
|
2009-01-14 17:01:55 +03:00
|
|
|
Jamconfig
|
2008-08-25 19:40:37 +04:00
|
|
|
tools/l10n-prepare.sh
|
2009-01-23 18:10:55 +03:00
|
|
|
data/startede
|
2009-08-06 02:19:57 +04:00
|
|
|
data/ede.desktop
|
2009-03-25 19:11:18 +03:00
|
|
|
doc/index.txt
|
2009-03-06 20:30:58 +03:00
|
|
|
services/org.equinoxproject.Launch.service
|
2008-08-25 19:40:37 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
chmod +x tools/l10n-prepare.sh
|
2009-01-23 18:10:55 +03:00
|
|
|
chmod +x data/startede
|