# XFC: Xfce Foundation Classes # Copyright (C) 2004-2005 The XFC Development Team. # # configure.ac: An autoconf template that generates the configure script dnl -------------------------------------------------------------- dnl Initialization macros. dnl -------------------------------------------------------------- AC_PREREQ(2.57) AC_INIT(libXFCcore/xfc/version.hh.in) AM_CONFIG_HEADER(libXFCcore/xfccore-config.h libXFCui/xfcui-config.h libXFCglade/xfcglade-config.h) dnl -------------------------------------------------------------- dnl Xfce directory name dnl -------------------------------------------------------------- XFCEDIR=xfce4 AC_SUBST(XFCEDIR) dnl -------------------------------------------------------------- dnl Package name and version number (user defined) dnl -------------------------------------------------------------- XFC_LIBRARY_NAME=xfc XFC_CORE_LIBRARY_NAME=xfccore XFC_UI_LIBRARY_NAME=xfcui XFC_GLADE_LIBRARY_NAME=xfcglade XFC_API_VERSION=4.3 #release versioning XFC_MAJOR_VERSION=4 XFC_MINOR_VERSION=3 XFC_MICRO_VERSION=1 #shared library versioning XFC_LIBRARY_VERSION=1:0:0 # | | | # +------+ | +---+ # | | | # current:revision:age # | | | # | | +- increment if interfaces have been added # | | set to zero if interfaces have been removed # | | or changed # | +- increment if source code has changed # | set to zero if current is incremented # +- increment if interfaces have been added, removed or changed dnl -------------------------------------------------------------- dnl Package name and version number dnl -------------------------------------------------------------- AC_SUBST(XFC_MAJOR_VERSION) AC_SUBST(XFC_MINOR_VERSION) AC_SUBST(XFC_MICRO_VERSION) AC_SUBST(XFC_LIBRARY_VERSION) PACKAGE=$XFC_LIBRARY_NAME AC_SUBST(XFC_LIBRARY_NAME) AC_SUBST(XFC_CORE_LIBRARY_NAME) AC_SUBST(XFC_UI_LIBRARY_NAME) AC_SUBST(XFC_GLADE_LIBRARY_NAME) AC_SUBST(XFC_API_VERSION) XFC_VERSION=$XFC_MAJOR_VERSION.$XFC_MINOR_VERSION.$XFC_MICRO_VERSION XFC_RELEASE=$XFC_MAJOR_VERSION.$XFC_MINOR_VERSION AC_SUBST(XFC_RELEASE) AC_SUBST(XFC_VERSION) AC_DEFINE_UNQUOTED(XFC_MAJOR_VERSION, $XFC_MAJOR_VERSION, [Define major version]) AC_DEFINE_UNQUOTED(XFC_MINOR_VERSION, $XFC_MINOR_VERSION, [Define minor version]) AC_DEFINE_UNQUOTED(XFC_MICRO_VERSION, $XFC_MICRO_VERSION, [Define micro version]) VERSION=$XFC_VERSION AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) dnl -------------------------------------------------------------- dnl Package options dnl -------------------------------------------------------------- AC_ARG_ENABLE(ansi, [AC_HELP_STRING([--enable-ansi], [turn on strict ansi [default=yes]])],, [enable_ansi=yes]) AC_ARG_ENABLE(pedantic-errors, [AC_HELP_STRING([--enable-pedantic-errors], [Issue all the warnings demanded by strict ISO C++ [default=no]])],, [enable_pedantic_errors=yes]) AC_ARG_ENABLE(debug, [AC_HELP_STRING([--disable-debug], [do not produce debugging information])],, [enable_debug=yes]) if test "x$enable_debug" = "xyes"; then CXXFLAGS="-g -O2" else CXXFLAGS="-O2" fi AC_ARG_ENABLE(demos, [AC_HELP_STRING([--disable-demos], [do not build the Xfc-UI demo program])],, [enable_demos=yes]) if test "x$enable_demos" = "xyes"; then DEMOS_SUBDIR="demos" else DEMOS_SUBDIR="" fi AC_ARG_ENABLE(docs, [AC_HELP_STRING([--disable-docs], [do not build the Xfc-UI API reference])],, [enable_docs=yes]) if test "x$enable_docs" = "xyes"; then DOCS_SUBDIR="docs tutorial" else DOCS_SUBDIR="" fi AC_ARG_ENABLE(examples, [AC_HELP_STRING([--disable-examples], [do not build the Xfc-UI example programs])],, [enable_examples=yes]) if test "x$enable_examples" = "xyes"; then EXAMPLES_SUBDIR="examples" else EXAMPLES_SUBDIR="" fi AC_ARG_ENABLE(tests, [AC_HELP_STRING([--disable-tests], [do not build the Xfc-UI test programs])],, [enable_tests=yes]) if test "x$enable_tests" = "xyes"; then TESTS_SUBDIR="tests" else TESTS_SUBDIR="" fi AC_SUBST(DEMOS_SUBDIR) AC_SUBST(DOCS_SUBDIR) AC_SUBST(EXAMPLES_SUBDIR) AC_SUBST(TESTS_SUBDIR) dnl -------------------------------------------------------------- dnl Find pkg-config dnl --------------------------------------------------------------- AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test x$PKG_CONFIG = xno ; then AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/]) fi if $PKG_CONFIG --atleast-pkgconfig-version 0.14; then : else AC_MSG_ERROR([*** pkg-config too old; version 0.14 or better required.]) fi dnl -------------------------------------------------------------- dnl Check for dependancies. dnl -------------------------------------------------------------- SIGC_REQUIRED_VERSION=2.0.6 PKG_CHECK_MODULES(XFC_SIGC, sigc++-2.0 >= ${SIGC_REQUIRED_VERSION}) AC_SUBST(SIGC_REQUIRED_VERSION) AC_SUBST(XFC_SIGC_CFLAGS) AC_SUBST(XFC_SIGC_LIBS) GLIB_REQUIRED_VERSION=2.6.0 PKG_CHECK_MODULES(XFC_GLIB, glib-2.0 >= ${GLIB_REQUIRED_VERSION} gobject-2.0 >= ${GLIB_REQUIRED_VERSION} gmodule-2.0 >= ${GLIB_REQUIRED_VERSION} gthread-2.0 >= ${GLIB_REQUIRED_VERSION}) AC_SUBST(GLIB_REQUIRED_VERSION) AC_SUBST(XFC_GLIB_CFLAGS) AC_SUBST(XFC_GLIB_LIBS) XFC_CORE_CFLAGS="$XFC_SIGC_CFLAGS $XFC_GLIB_CFLAGS" XFC_CORE_LIBS="$XFC_SIGC_LIBS $XFC_GLIB_LIBS" AC_SUBST(XFC_CORE_CFLAGS) AC_SUBST(XFC_CORE_LIBS) ATK_REQUIRED_VERSION=1.9.0 PKG_CHECK_MODULES(XFC_ATK, atk >= $ATK_REQUIRED_VERSION) AC_SUBST(ATK_REQUIRED_VERSION) AC_SUBST(XFC_ATK_CFLAGS) PANGO_REQUIRED_VERSION=1.8.0 PKG_CHECK_MODULES(XFC_PANGO, pango >= $PANGO_REQUIRED_VERSION) AC_SUBST(PANGO_REQUIRED_VERSION) AC_SUBST(XFC_PANGO_CFLAGS) GTK_REQUIRED_VERSION=2.6.0 PKG_CHECK_MODULES(XFC_GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION) AC_SUBST(GTK_REQUIRED_VERSION) AC_SUBST(XFC_GTK_CFLAGS) AC_SUBST(XFC_GTK_LIBS) XFC_UI_CFLAGS="$XFC_CORE_CFLAGS $XFC_ATK_CFLAGS $XFC_PANGO_CFLAGS $XFC_GTK_CFLAGS" XFC_UI_LIBS="$XFC_CORE_LIBS $XFC_GTK_LIBS" AC_SUBST(XFC_UI_CFLAGS) AC_SUBST(XFC_UI_LIBS) GLADE_REQUIRED_VERSION=2.4.0 PKG_CHECK_MODULES(XFC_GLADE, libglade-2.0 >= $GLADE_REQUIRED_VERSION, [GLADE_SUBDIR="libXFCglade"; GLADE_TESTSDIR="glade"; GLADE_FOUND="yes"], [GLADE_SUBDIR=""; GLADE_TESTSDIR=""; GLADE_FOUND="no"]) AC_SUBST(GLADE_REQUIRED_VERSION) AC_SUBST(XFC_GLADE_CFLAGS) AC_SUBST(XFC_GLADE_LIBS) AC_SUBST(GLADE_SUBDIR) AC_SUBST(GLADE_TESTSDIR) dnl -------------------------------------------------------------- dnl Checks for programs. dnl -------------------------------------------------------------- AC_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_MAKE_SET AM_DISABLE_STATIC AM_PROG_LIBTOOL AM_SANITY_CHECK AC_PATH_PROGS([PERL_PATH], [perl perl5], [perl]) AC_SUBST([PERL_PATH]) changequote(,)dnl if test "x$GCC" = "xyes"; then case " $CXXFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CXXFLAGS="$CXXFLAGS -Wall" ;; esac if test "x$enable_ansi" = "xyes"; then case " $CXXFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) CXXFLAGS="$CXXFLAGS -ansi" ;; esac fi if test "x$enable_pedantic_errors" = "xyes"; then case " $CXXFLAGS " in *[\ \ ]-pedantic-errors[\ \ ]*) ;; *) CXXFLAGS="$CXXFLAGS --pedantic-errors" ;; esac fi fi changequote([,])dnl dnl -------------------------------------------------------------- dnl Checks for header files. dnl -------------------------------------------------------------- AC_HEADER_STDC dnl -------------------------------------------------------------- dnl Checks for typedefs, structures, and compiler characteristics. dnl -------------------------------------------------------------- AC_C_CONST AC_TYPE_SIZE_T dnl -------------------------------------------------------------- dnl Checks for functions. dnl -------------------------------------------------------------- AC_CHECK_FUNCS(lstat mkstemp flockfile funlockfile getc_unlocked) dnl -------------------------------------------------------------- dnl Configure XFC enviroment dnl -------------------------------------------------------------- xfc_docdir="$datadir/doc/$PACKAGE-$XFC_API_VERSION" AC_SUBST(xfc_docdir) dnl -------------------------------------------------------------- dnl Generates Makefile's, configuration files and scripts dnl -------------------------------------------------------------- AC_OUTPUT(Makefile \ xfc.spec \ libXFCcore/Makefile \ libXFCcore/xfccore-4.3.pc \ libXFCcore/xfc/Makefile \ libXFCcore/xfc/version.hh \ libXFCcore/xfc/glib/Makefile \ libXFCcore/xfc/glib/inline/Makefile \ libXFCcore/xfc/glib/private/Makefile \ libXFCui/Makefile \ libXFCui/xfcui-4.3.pc \ libXFCui/xfc/Makefile \ libXFCui/xfc/atk/Makefile \ libXFCui/xfc/atk/inline/Makefile \ libXFCui/xfc/atk/private/Makefile \ libXFCui/xfc/gdk/Makefile \ libXFCui/xfc/gdk/inline/Makefile \ libXFCui/xfc/gdk/private/Makefile \ libXFCui/xfc/gdk-pixbuf/Makefile \ libXFCui/xfc/gdk-pixbuf/inline/Makefile \ libXFCui/xfc/gdk-pixbuf/private/Makefile \ libXFCui/xfc/gtk/Makefile \ libXFCui/xfc/gtk/inline/Makefile \ libXFCui/xfc/gtk/private/Makefile \ libXFCui/xfc/pango/Makefile \ libXFCui/xfc/pango/inline/Makefile \ libXFCui/xfc/pango/private/Makefile \ libXFCglade/Makefile \ libXFCglade/xfcglade-4.3.pc \ libXFCglade/xfc/Makefile \ libXFCglade/xfc/glade/Makefile \ libXFCglade/xfc/glade/inline/Makefile \ libXFCglade/xfc/glade/private/Makefile \ demos/Makefile \ demos/xfc-demo/Makefile \ examples/Makefile \ examples/actions/Makefile \ examples/arrow/Makefile \ examples/aspectframe/Makefile \ examples/buttonbox/Makefile \ examples/buttons/Makefile \ examples/calendar/Makefile \ examples/colorselection/Makefile \ examples/combobox/Makefile \ examples/dial/Makefile \ examples/dnd/Makefile \ examples/drawingarea/Makefile \ examples/entry/Makefile \ examples/entrycompletion/Makefile \ examples/eventbox/Makefile \ examples/fixed/Makefile \ examples/fontselection/Makefile \ examples/frame/Makefile \ examples/label/Makefile \ examples/menu/Makefile \ examples/notebook/Makefile \ examples/packbox/Makefile \ examples/paned/Makefile \ examples/progressbar/Makefile \ examples/radiobuttons/Makefile \ examples/rangewidgets/Makefile \ examples/rulers/Makefile \ examples/scrolledwindow/Makefile \ examples/selection/Makefile \ examples/spinbutton/Makefile \ examples/statusbar/Makefile \ examples/table/Makefile \ examples/textview/Makefile \ examples/thread/Makefile \ examples/tictactoe/Makefile \ examples/toolbar/Makefile \ examples/treeview/Makefile \ tests/Makefile \ tests/actions/Makefile \ tests/combobox/Makefile \ tests/core/Makefile \ tests/core/iochannel/Makefile \ tests/core/mainloop/Makefile \ tests/core/spawn/Makefile \ tests/core/threads/Makefile \ tests/entrycompletion/Makefile \ tests/filechooser/Makefile \ tests/glade/Makefile \ tests/glade/example-1/Makefile \ tests/glade/example-2/Makefile \ tests/glade/example-3/Makefile \ tests/glade/example-4/Makefile \ tests/mergemenus/Makefile \ tests/toolbar/Makefile \ docs/index.html \ docs/Makefile \ docs/faq/Makefile \ docs/howto/Makefile \ docs/images/Makefile \ docs/reference/Doxyfile \ docs/reference/Makefile \ docs/reference/xfc_footer.html \ docs/tutorial/Makefile \ tutorial/Makefile \ tutorial/chapter01/Makefile \ tutorial/chapter02/Makefile \ tutorial/chapter03/Makefile \ tutorial/chapter04/Makefile \ tutorial/chapter06/Makefile \ tutorial/chapter07/Makefile \ tutorial/chapter08/Makefile \ tutorial/chapter08/src/Makefile \ tutorial/chapter09/Makefile \ tutorial/chapter09/src/Makefile \ ) echo echo "Compiling XFC with libglade support: $GLADE_FOUND" echo