2005-12-30 20:40:34 +01:00
|
|
|
# configure.ac - Copyright 2005, University
|
|
|
|
# of Padova, dept. of Pure and Applied
|
|
|
|
# Mathematics
|
|
|
|
#
|
|
|
|
# This file is part of SGPEMv2.
|
|
|
|
#
|
|
|
|
# This is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# SGPEMv2 is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with SGPEMv2; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
dnl ----------------- CONFIGURE ---------------------
|
|
|
|
|
2006-05-24 10:12:39 +02:00
|
|
|
AC_INIT([sgpemv2],[0.3],[matteo@member.fsf.org])
|
2005-12-30 20:40:34 +01:00
|
|
|
|
|
|
|
if test -f "`pwd`/configure.ac"; then
|
|
|
|
AC_MSG_FAILURE([
|
2006-05-24 10:12:39 +02:00
|
|
|
** This seems to be the pkg root directory.
|
2005-12-30 20:40:34 +01:00
|
|
|
** Compiling here your sources is considered
|
|
|
|
** as unpolite as exploring your nose with
|
|
|
|
** your pinky whilst attending a wedding party.
|
2006-05-24 10:12:39 +02:00
|
|
|
** Please create a new dir as described in
|
|
|
|
** the README file, and then run configure
|
|
|
|
** into it. If you think you've got it right,
|
2005-12-30 20:40:34 +01:00
|
|
|
** please inform the mantainer of this error!
|
|
|
|
** He'll thoroughfully bash his head on the wall.],
|
|
|
|
-1 )
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_GNU_SOURCE
|
|
|
|
AC_CONFIG_AUX_DIR(config)
|
|
|
|
|
|
|
|
AC_CANONICAL_TARGET
|
|
|
|
|
|
|
|
dnl starting automake
|
2006-01-26 21:32:06 +01:00
|
|
|
AM_INIT_AUTOMAKE([dejagnu dist-bzip2])
|
2005-12-30 20:40:34 +01:00
|
|
|
|
2006-01-13 16:52:22 +01:00
|
|
|
dnl gettext & libtool
|
2006-01-27 20:26:27 +01:00
|
|
|
AC_ARG_VAR([LT_LDFLAGS],
|
|
|
|
[You can use this variable to pass an option
|
|
|
|
to libtool when it is in linking mode (for
|
|
|
|
example, "-all-static")])
|
2006-01-13 16:52:22 +01:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AM_GNU_GETTEXT([external])
|
2006-01-17 11:23:22 +01:00
|
|
|
AM_GNU_GETTEXT_VERSION([0.14.1])
|
2006-01-13 16:52:22 +01:00
|
|
|
|
2005-12-30 20:40:34 +01:00
|
|
|
dnl various requisites
|
2006-01-31 23:49:22 +01:00
|
|
|
SIGCPP_VERSION=2.0.10
|
2006-01-13 16:52:22 +01:00
|
|
|
GTKMM_VERSION=2.8.0
|
|
|
|
CAIRO_VERSION=1.0.0
|
2005-12-30 20:40:34 +01:00
|
|
|
|
|
|
|
dnl c++ compiler and flags
|
2006-01-13 16:52:22 +01:00
|
|
|
AC_PROG_CXX
|
2006-02-20 22:26:08 +01:00
|
|
|
AC_CHECK_CXXFLAG([CXXFLAGS], [Wall])
|
|
|
|
AC_CHECK_CXXFLAG([CXXFLAGS], [pedantic])
|
|
|
|
AC_CHECK_CXXFLAG([CXXFLAGS], [Wextra])
|
|
|
|
AC_CHECK_CXXFLAG([CXXFLAGS], [Wno-long-long])
|
|
|
|
AC_CHECK_LDFLAG([LDFLAGS],[--as-needed])
|
2005-12-30 20:40:34 +01:00
|
|
|
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
dnl make
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
|
|
|
|
dnl check for gtkmm & cairo
|
2006-04-07 21:57:58 +02:00
|
|
|
PKG_PROG_PKG_CONFIG([0.20])
|
2006-05-24 10:01:13 +02:00
|
|
|
if test -z "$PKG_CONFIG"; then
|
|
|
|
AC_MSG_ERROR([You may need to update your pkg-config installation])
|
|
|
|
fi
|
|
|
|
|
2006-01-13 16:52:22 +01:00
|
|
|
PKG_CHECK_MODULES([CAIRO],
|
|
|
|
[cairo >= $CAIRO_VERSION],
|
2006-01-15 20:40:02 +01:00
|
|
|
:, AC_MSG_ERROR([$CAIRO_PKG_ERRORS]))
|
2006-01-13 16:52:22 +01:00
|
|
|
PKG_CHECK_MODULES([GTHREAD],
|
|
|
|
[gthread-2.0 >= $GTKMM_VERSION],
|
2006-01-15 20:40:02 +01:00
|
|
|
:, AC_MSG_ERROR([$GTHREAD_PKG_ERRORS]))
|
2006-01-31 23:49:22 +01:00
|
|
|
PKG_CHECK_MODULES([SIGCPP],
|
|
|
|
[sigc++-2.0 >= $SIGCPP_VERSION],
|
|
|
|
:, AC_MSG_ERROR([$SIGCPP_PKG_ERRORS]))
|
|
|
|
PKG_CHECK_MODULES([GLIBMM],
|
|
|
|
[glibmm-2.4 >= $GTKMM_VERSION],
|
|
|
|
:, AC_MSG_ERROR([$GLIBMM_PKG_ERRORS]))
|
2006-01-17 12:44:08 +01:00
|
|
|
PKG_CHECK_MODULES([GTKMM],
|
|
|
|
[gtkmm-2.4 >= $GTKMM_VERSION],
|
|
|
|
:, AC_MSG_ERROR([$GTKMM_PKG_ERRORS]))
|
2005-12-30 20:40:34 +01:00
|
|
|
|
2006-01-26 19:31:23 +01:00
|
|
|
dnl use DSO visibility tags for systems that supports it correctly
|
2006-07-05 13:11:50 +02:00
|
|
|
SGPEMV2_VISIBILITY_SUPPORT
|
2006-01-26 19:31:23 +01:00
|
|
|
|
2006-01-26 21:32:06 +01:00
|
|
|
dnl check for Doxygen
|
|
|
|
AC_CHECK_PROG([HAVE_DOXYGEN],[doxygen],[yes])
|
|
|
|
AC_CHECK_PROG([HAVE_DOT],[dot], [yes])
|
|
|
|
AM_CONDITIONAL([HAVE_DOXYGEN],[test x$HAVE_DOXYGEN = xyes])
|
|
|
|
|
2006-03-09 22:02:43 +01:00
|
|
|
dnl see if we've to compile tests
|
|
|
|
AC_MSG_CHECKING([whether tests have to be built])
|
|
|
|
AC_ARG_ENABLE([tests],
|
|
|
|
AS_HELP_STRING([--disable-tests],
|
|
|
|
[don't compile the tests provided with sgpemv2]),
|
|
|
|
[compile_tests="$enableval"],
|
|
|
|
[compile_tests="yes"])
|
|
|
|
AC_MSG_RESULT([$compile_tests])
|
|
|
|
AM_CONDITIONAL([COND_TESTS], [test "$compile_tests" = "yes"])
|
|
|
|
|
|
|
|
dnl output files
|
2006-04-07 21:57:58 +02:00
|
|
|
AC_CONFIG_FILES([config/Doxyfile config/sgpemv2.pc config/sgpemv2-uninstalled.pc])
|
2005-12-30 21:09:33 +01:00
|
|
|
AC_CONFIG_HEADERS([config.h:config.h.in])
|
2006-04-07 22:14:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
dnl configure plugin directories
|
|
|
|
dnl TODO: make this conditional
|
2006-06-13 17:34:24 +02:00
|
|
|
AC_CONFIG_FILES([plugins/pyloader/config/sgpemv2-uninstalled.pc:config/sgpemv2-uninstalled.pc.in])
|
|
|
|
AC_CONFIG_FILES([plugins/xmlsave/config/sgpemv2-uninstalled.pc:config/sgpemv2-uninstalled.pc.in])
|
2005-12-30 21:09:33 +01:00
|
|
|
|
2006-06-13 17:34:24 +02:00
|
|
|
AC_CONFIG_SUBDIRS([plugins/pyloader plugins/xmlsave])
|
2006-04-07 22:14:04 +02:00
|
|
|
|
2006-06-13 17:34:24 +02:00
|
|
|
# Now, output this very package Makefiles:
|
2006-01-13 16:52:22 +01:00
|
|
|
AC_CONFIG_FILES([
|
2006-06-13 17:09:13 +02:00
|
|
|
Makefile
|
|
|
|
po/Makefile.in
|
2005-12-30 20:40:34 +01:00
|
|
|
])
|
2005-12-30 21:09:33 +01:00
|
|
|
AC_OUTPUT
|