plugins/base2/net.sf.basedb.normalizers/trunk/src/c++/configure.ac

Code
Comments
Other
Rev Date Author Line
69 11 Feb 06 jari 1 # Process this file with autoconf to produce a configure script.
69 11 Feb 06 jari 2 #
69 11 Feb 06 jari 3 # $Id$
69 11 Feb 06 jari 4 #
95 05 Apr 06 jari 5 # Copyright (C) 2005, 2006 Jari Häkkinen, Peter Johansson
315 28 May 07 peter 6 # Copyright (C) 2007 Peter Johansson
952 06 Feb 09 jari 7 # Copyright (C) 2008, 2009 Jari Häkkinen, Peter Johansson
95 05 Apr 06 jari 8 #
952 06 Feb 09 jari 9 # This file is part of the Normalizers plug-in package for BASE
952 06 Feb 09 jari 10 # (net.sf.based.normalizers). The package is available at
952 06 Feb 09 jari 11 # http://baseplugins.thep.lu.se/ BASE main site is
952 06 Feb 09 jari 12 # http://base.thep.lu.se/
95 05 Apr 06 jari 13 #
952 06 Feb 09 jari 14 # This is free software; you can redistribute it and/or modify it
952 06 Feb 09 jari 15 # under the terms of the GNU General Public License as published by
952 06 Feb 09 jari 16 # the Free Software Foundation; either version 3 of the License, or
952 06 Feb 09 jari 17 # (at your option) any later version.
95 05 Apr 06 jari 18 #
952 06 Feb 09 jari 19 # The software is distributed in the hope that it will be useful,
952 06 Feb 09 jari 20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
952 06 Feb 09 jari 21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
952 06 Feb 09 jari 22 # General Public License for more details.
95 05 Apr 06 jari 23 #
95 05 Apr 06 jari 24 # You should have received a copy of the GNU General Public License
952 06 Feb 09 jari 25 # along with this program. If not, see <http://www.gnu.org/licenses/>.
95 05 Apr 06 jari 26 #
69 11 Feb 06 jari 27 # If you grabbed the source from subversion you should, at top-level,
69 11 Feb 06 jari 28 # execute:
855 02 Dec 08 jari 29 #   ./bootstrap
69 11 Feb 06 jari 30 #
69 11 Feb 06 jari 31
1041 20 Apr 09 jari 32 AC_INIT([qqn],[@PKGVERSION@],[jari.hakkinen@med.lu.se])
952 06 Feb 09 jari 33 AC_PREREQ(2.61)
952 06 Feb 09 jari 34 AC_CONFIG_SRCDIR([bin/qQN.cc])
69 11 Feb 06 jari 35 AC_CONFIG_AUX_DIR([autotools])
69 11 Feb 06 jari 36 AC_PREFIX_DEFAULT([/usr/local])
954 08 Feb 09 jari 37 AC_CONFIG_MACRO_DIR([m4])
69 11 Feb 06 jari 38
69 11 Feb 06 jari 39 AM_CONFIG_HEADER([config.h])
952 06 Feb 09 jari 40 AM_INIT_AUTOMAKE([1.10 std-options])
69 11 Feb 06 jari 41
821 25 Nov 08 jari 42 # Set default programming language
821 25 Nov 08 jari 43 AC_LANG(C++)
821 25 Nov 08 jari 44
841 29 Nov 08 peter 45 # Let user overide default CXXFLAGS
963 16 Feb 09 jari 46 if (test "${CXXFLAGS+set}" != set) ; then
952 06 Feb 09 jari 47   # Setting CXXFLAGS here to prevent expansion in AC_PROG_CXX
952 06 Feb 09 jari 48   CXXFLAGS="-Wall -pedantic -O3"
841 29 Nov 08 peter 49 fi
841 29 Nov 08 peter 50
69 11 Feb 06 jari 51 # Checks for programs.
839 29 Nov 08 peter 52 AC_PROG_CXXCPP
69 11 Feb 06 jari 53 AC_PROG_CXX
69 11 Feb 06 jari 54 AC_PROG_INSTALL
69 11 Feb 06 jari 55
963 16 Feb 09 jari 56 AC_ARG_ENABLE(libcheck,
963 16 Feb 09 jari 57               [AS_HELP_STRING([--enable-libcheck],
963 16 Feb 09 jari 58                               [Check for dependency libs (default is yes)])],
963 16 Feb 09 jari 59               if (test "$enableval" = "no") ; then
963 16 Feb 09 jari 60                 libcheck=no
963 16 Feb 09 jari 61               fi
963 16 Feb 09 jari 62              )
963 16 Feb 09 jari 63
963 16 Feb 09 jari 64 # checking for dependency libs may be disabled, normally used to
963 16 Feb 09 jari 65 # create a source distribuion on a machine wihtout required APIs like
963 16 Feb 09 jari 66 # yat.
963 16 Feb 09 jari 67 if (test "${libcheck}" = "no") ; then
963 16 Feb 09 jari 68   yat_found="not checked"
963 16 Feb 09 jari 69 else
963 16 Feb 09 jari 70   yat_found="no"
1055 06 May 09 jari 71   yat_version="0.5.3"
963 16 Feb 09 jari 72   YAT_CHECK_YAT([${yat_version}],[yat_found="yes"])
963 16 Feb 09 jari 73   if (test "${yat_found}" = "yes") ; then
963 16 Feb 09 jari 74     AM_CPPFLAGS="$YAT_CPPFLAGS $AM_CPPFLAGS"
963 16 Feb 09 jari 75     AM_CXXFLAGS="$YAT_CXXFLAGS $AM_CXXFLAGS"
963 16 Feb 09 jari 76     AM_LDFLAGS="$YAT_LDFLAGS $AM_LDFLAGS"
963 16 Feb 09 jari 77     LIBS="$YAT_LIBS $LIBS"
963 16 Feb 09 jari 78   fi
963 16 Feb 09 jari 79   AC_SUBST(AM_CPPFLAGS)
963 16 Feb 09 jari 80   AC_SUBST(AM_CXXFLAGS)
963 16 Feb 09 jari 81   AC_SUBST(AM_LDFLAGS)
321 31 May 07 peter 82 fi
841 29 Nov 08 peter 83
69 11 Feb 06 jari 84 AC_CONFIG_FILES([Makefile
952 06 Feb 09 jari 85                  bin/Makefile])
69 11 Feb 06 jari 86
952 06 Feb 09 jari 87 # Non-existing or too old yat is fatal -- sub-sequent compilation will fail.
963 16 Feb 09 jari 88 if (test "${yat_found}" = "no") ; then
960 12 Feb 09 jari 89   AC_CHECK_HEADER(
960 12 Feb 09 jari 90     [yat/utility/utility.h],
952 06 Feb 09 jari 91     AC_MSG_FAILURE([
952 06 Feb 09 jari 92     yat found but not the required version.
960 12 Feb 09 jari 93     Please upgrade to yat version ${yat_version} or later]),
952 06 Feb 09 jari 94     AC_MSG_FAILURE([
952 06 Feb 09 jari 95     yat not found. The yat library cannot be found.
952 06 Feb 09 jari 96     Please make sure yat is installed.])
952 06 Feb 09 jari 97   )
952 06 Feb 09 jari 98 fi
952 06 Feb 09 jari 99
69 11 Feb 06 jari 100 AC_OUTPUT
319 28 May 07 peter 101
319 28 May 07 peter 102 # Some more messages.
319 28 May 07 peter 103 AC_MSG_NOTICE([])
952 06 Feb 09 jari 104 AC_MSG_NOTICE([Ready to build qQN])
320 29 May 07 peter 105 AC_MSG_NOTICE([])
952 06 Feb 09 jari 106 AC_MSG_NOTICE([qQN will be installed in])
1009 30 Mar 09 jari 107 AC_MSG_NOTICE([    $bindir ])
320 29 May 07 peter 108 AC_MSG_NOTICE([])
844 01 Dec 08 jari 109 AC_MSG_NOTICE([The following libs and flags will be used:])
844 01 Dec 08 jari 110 AC_MSG_NOTICE([+++++++++++++++++++++++++++++++++++++++++++++++])
843 01 Dec 08 jari 111 AC_MSG_NOTICE([  CPPFLAGS     = $CPPFLAGS $AM_CPPFLAGS])
843 01 Dec 08 jari 112 AC_MSG_NOTICE([  CXXFLAGS     = $CXXFLAGS $AM_CXXFLAGS])
965 18 Feb 09 jari 113 AC_MSG_NOTICE([  LDFLAGS      = $LDFLAGS $AM_LDFLAGS])
843 01 Dec 08 jari 114 AC_MSG_NOTICE([  LIBS         = $LIBS])
844 01 Dec 08 jari 115 AC_MSG_NOTICE([+++++++++++++++++++++++++++++++++++++++++++++++])
319 28 May 07 peter 116 AC_MSG_NOTICE([])
960 12 Feb 09 jari 117 AC_MSG_NOTICE([ Now type 'make && make install'.])
963 16 Feb 09 jari 118 if (test "${libcheck}" = "no") ; then
963 16 Feb 09 jari 119   AC_MSG_NOTICE([])
963 16 Feb 09 jari 120   AC_MSG_NOTICE([Checks for dependency libs disabled, make will probably fail.])
963 16 Feb 09 jari 121 fi