source: plugins/base2/net.sf.basedb.normalizers/trunk/src/c++/configure.ac @ 973

Last change on this file since 973 was 973, checked in by Jari Häkkinen, 13 years ago

Addresses #118. Required yat version is 0.5 or later

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