dnl This file is part of the KDE libraries/packages dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org) dnl modified by Walter Tasin (tasin@kdevelop.org) dnl for c++ console applications dnl This file is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Library General Public dnl License as published by the Free Software Foundation; either dnl version 2 of the License, or (at your option) any later version. dnl This library is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl Library General Public License for more details. dnl You should have received a copy of the GNU Library General Public License dnl along with this library; see the file COPYING.LIB. If not, write to dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, dnl Boston, MA 02111-1307, USA. # Original Author was Kalle@kde.org # I lifted it in some mater. (Stephan Kulow) # I used much code from Janos Farkas dnl Process this file with autoconf to produce a configure script. dnl Must use autoconf 2.5 or later AC_PREREQ(2.5) AC_INIT(acinclude.m4) dnl a source file from your sub dir dnl This is so we can use kde-common AC_CONFIG_AUX_DIR(admin) dnl This ksh/zsh feature conflicts with `cd blah ; pwd` unset CDPATH dnl Checking host/target/build systems, for make, install etc. AC_CANONICAL_SYSTEM dnl Perform program name transformation AC_ARG_PROGRAM dnl Automake doc recommends to do this only here. (Janos) AM_INIT_AUTOMAKE(eboxy,0.4.1) dnl almost the same like KDE_SET_PEFIX but the path is /usr/local dnl unset CDPATH dnl make /usr/local the default for the installation AC_PREFIX_DEFAULT(/usr/local) if test "x$prefix" = "xNONE"; then prefix=$ac_default_prefix ac_configure_args="$ac_configure_args --prefix $prefix" fi KDE_FAST_CONFIGURE KDE_CONF_FILES dnl without this order in this file, automake will be confused! dnl AM_CONFIG_HEADER(config.h) dnl checks for programs. dnl first check for c/c++ compilers AC_CHECK_COMPILERS dnl CXXFLAGS="$NOOPT_CXXFLAGS" dnl __kdevelop[noopt]__ dnl CFLAGS="$NOOPT_CFLAGS" dnl __kdevelop[noopt]__ CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS" dnl __kdevelop[exc]__ dnl create only shared libtool-libraries AC_ENABLE_SHARED(yes) dnl set the following to yes, if you want to create static dnl libtool-libraries, too. AC_ENABLE_STATIC(no) dnl create a working libtool-script KDE_PROG_LIBTOOL dnl activate the next macro call for DLOPEN tests and setting LIBDL dnl (n.b. KDE_MISC_TESTS does the same to you, so use either this or the next one) dnl KDE_CHECK_DLOPEN dnl activate the next macro call for some additional tests dnl (compat, crypt, socket, nsl, dlopen, ...) dnl KDE_MISC_TESTS dnl __kdevelop__ dnl KDE_NEED_FLEX dnl __kdevelop__ dnl AC_PROG_YACC dnl __kdevelop__ KDE_CHECK_EXTRA_LIBS all_libraries="$all_libraries $USER_LDFLAGS" all_includes="$all_includes $USER_INCLUDES" AC_SUBST(all_includes) AC_SUBST(all_libraries) AC_SUBST(AUTODIRS) dnl Test for XML, and define XML_CFLAGS and XML_LIBS XML2_VERSION=2.4.19 AM_PATH_XML2($XML2_VERSION, :, AC_MSG_ERROR([*** libxml2 version $XML2_VERSION not found!]) ) dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS SDL_VERSION=1.2.0 AM_PATH_SDL($SDL_VERSION, :, AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) ) AC_CHECK_LIB(SDL_image, main, SDL_LIBS="$SDL_LIBS -lSDL_image", AC_MSG_ERROR([*** SDL_image library not found!]) ) AC_CHECK_LIB(SDL_ttf, main, SDL_LIBS="$SDL_LIBS -lSDL_ttf", AC_MSG_ERROR([*** SDL_ttf library not found!]) ) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_CHECK_LIB(SDL_gui, main, SDL_LIBS="$SDL_LIBS -lSDL_gui", AC_MSG_ERROR([*** SDL_gui library not found!]) ) AC_LANG_RESTORE dnl dnl Check for LIRC client support dnl AC_CHECK_LIRC dnl dnl Check for SDL_mixer dnl AC_CHECK_LIB(SDL_mixer, main, have_sdlmixer=true, AC_MSG_NOTICE([*** SDL_mixer library not found. simplemusic plugin will not be built.]) have_sdlmixer=false ) AM_CONDITIONAL(SDLMIXER, test x$have_sdlmixer = xtrue) AC_ARG_WITH(plugin-path,[ --with-plugin-path=path Where eboxy should load plugins from], plugin_path="$withval", plugin_path="\$(pkglibdir)/plugins") AH_TEMPLATE(JOYSTICK) AC_ARG_ENABLE(joystick,[ --disable-joystick Disable joystick features], joystick=no, joystick=yes) if test "$joystick" = "yes"; then AC_DEFINE(JOYSTICK) else AC_MSG_RESULT([*** Joystick support disabled ***]); fi dnl Now finally add the SDL_GUI CFLAGS CXXFLAGS="$CXXFLAGS $SDLGUI_CFLAGS" LIBS="$LIBS $SDLGUI_LIBS" dnl Add path to plugin files CXXFLAGS="$CXXFLAGS -DPLUGIN_LIB_DIR=\\\"$plugin_path\\\"" dnl Add path to data files CXXFLAGS="$CXXFLAGS -DDATA_DIR=\$(pkgdatadir)/" dnl Add shared library extension (FIXME: this needs to be platform-neutralised somehow) CXXFLAGS="$CXXFLAGS -DPLUGIN_LIB_SUFFIX=\\\".so\\\"" dnl Enable large file support CXXFLAGS="$CXXFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" AC_SUBST(plugin_path) KDE_CREATE_SUBDIRSLIST AC_CONFIG_FILES([ Makefile ]) AC_CONFIG_FILES([ eboxy/Makefile ]) AC_CONFIG_FILES([ eboxy/basewidgets/Makefile ]) AC_CONFIG_FILES([ eboxy/docs/Makefile ]) AC_CONFIG_FILES([ eboxy/docs/en/Makefile ]) AC_CONFIG_FILES([ eboxy/docs/en/pluginapi/Makefile ]) AC_CONFIG_FILES([ eboxy/interface/Makefile ]) AC_CONFIG_FILES([ eboxy/interface/sdl_gui/Makefile ]) AC_CONFIG_FILES([ plugins/Makefile ]) AC_CONFIG_FILES([ plugins/develop/Makefile ]) AC_CONFIG_FILES([ plugins/filebrowser/Makefile ]) AC_CONFIG_FILES([ plugins/simplemusic/Makefile ]) AC_CONFIG_FILES([ skins/Makefile ]) AC_CONFIG_FILES([ skins/fontbrowser/Makefile ]) AC_CONFIG_FILES([ skins/test/Makefile ]) AC_OUTPUT if test "$all_tests" = "bad"; then if test ! "$cache_file" = "/dev/null"; then echo "" echo "Please remove the file $cache_file after changing your setup" echo "so that configure will find the changes next time." echo "" fi else echo "" echo "Good - your configure finished. Start make now" echo "" fi