1 ## Process this file with autoconf to create configure. -*- autoconf -*-
2 # Copyright (C) 2001, 2004 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 AC_PREREQ(2.58) ## We use AS_HELP_STRING
21 ## Oldest automake required for bootstrap is below in AM_INIT_AUTOMAKE.
24 ## ------------------------ ##
25 ## Autoconf initialisation. ##
26 ## ------------------------ ##
27 AC_INIT([libtool], [1.5a], [bug-libtool@gnu.org])
28 AC_CONFIG_HEADERS([config.h:config-h.in])
29 AC_CONFIG_SRCDIR([libtoolize.in])
30 AC_CONFIG_AUX_DIR([config])
33 ## ------------------------ ##
34 ## Autotest initialisation. ##
35 ## ------------------------ ##
37 dnl AC_CONFIG_TESTDIR([tests])
38 dnl AC_CONFIG_FILES([tests/atlocal])
41 ## ---------------------------------------- ##
42 ## Display a configure time version banner. ##
43 ## ---------------------------------------- ##
45 # Calculating the previous version is somewhat involved, so do it once
46 # here, and SUBST the result for the maintainer release rules. The
47 # versioning scheme we use is described here:
48 # http://www.gnu.org/software/libtool/contribute.html
50 # First we break the version number up into its constituent parts.
51 lt_major=`echo "AC_PACKAGE_VERSION" | sed ['s,\..*$,,g']`
52 lt_minor=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.\([0-9]*\).*$,\1,']`
53 lt_micro=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.[0-9]*\(\.[0-9]*\).*$,\1,']`
54 lt_alpha=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9.]*,,']`
56 test "$lt_minor" = "AC_PACKAGE_VERSION" && lt_minor=0
57 test "$lt_micro" = "AC_PACKAGE_VERSION" && lt_micro=""
59 # Then we try to work out what the release before this one would have been
60 # numbered. The only time we come unstuck is when this is the first release
61 # from a stable branch (lt_micro=lt_alpha=""), so LASTRELEASE is the last
62 # release from the old stable branch, and we don't know what version that
63 # was, so leave it unset so that the Makefile can complain.
68 LASTRELEASE="$lt_major.$lt_minor" ;;
70 LASTRELEASE="$lt_major.$lt_minor$lt_micro" ;;
74 LASTRELEASE=`echo "AC_PACKAGE_VERSION" | tr 'c-y' 'b-w'` ;;
76 LASTRELEASE=`echo "AC_PACKAGE_VERSION" | tr 'd-z' 'b-x'` ;;
77 *) # No lt_alpha component
82 LASTRELEASE="$lt_major.$lt_minor" ;;
84 lt_micro_value=`echo $lt_micro | sed 's,^\.,,'`
85 LASTRELEASE="$lt_major.$lt_minor.`expr $lt_micro_value - 1`" ;;
91 AC_SUBST([LASTRELEASE])
93 # This is a sanity check so we can see which version is used in bug reports.
94 # It is assumed that we only want to see the date extension for cvs libtool
95 # versions (i.e. "odd" letters) and not actual alpha releases.
96 TIMESTAMP=`${CONFIG_SHELL} ${ac_aux_dir}/mkstamp < ${srcdir}/ChangeLog`
97 package_revision=`( set $TIMESTAMP; echo $1; )`
103 AS_BOX([Configuring AC_PACKAGE_TARNAME${TIMESTAMP:+" (Build:$TIMESTAMP)"} AC_PACKAGE_VERSION])
105 AC_SUBST([TIMESTAMP])
106 AC_SUBST([package_revision])
109 ## ------------------------ ##
110 ## Automake Initialisation. ##
111 ## ------------------------ ##
113 dnl These are bootstrap requirements, once built, libtool may work with
114 dnl much older releases of autoconf and automake. See release notes.
115 AM_INIT_AUTOMAKE([1.8 gnits dist-bzip2]) ## We use auto-m4_including
117 dnl Make sure config.status is regenerated when the version timestamp changes
118 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_builddir)/stamp-vcl'])
120 ## ------------------------------- ##
121 ## Libtool specific configuration. ##
122 ## ------------------------------- ##
123 pkgdatadir='${datadir}'"/${PACKAGE}"
124 AC_SUBST([pkgdatadir]) # automake does not need this, but libtoolize does
126 aclocaldir='${datadir}/aclocal'
127 AC_SUBST([aclocaldir])
129 AC_ARG_ENABLE(ltdl-install,
130 [AS_HELP_STRING([--disable-ltdl-install], [do not install libltdl])])
131 if test x"${enable_ltdl_install+set}" != xset; then
132 enable_ltdl_install=yes
135 # All subdirectories that are configured on demand, but that must be
136 # included in the distribution. This substitution is for tests/Makefile.am,
137 # so the directory names are relative to that directory.
138 CONF_SUBDIRS="cdemo demo depdemo f77demo mdemo mdemo2 pdemo tagdemo"
139 AC_SUBST([CONF_SUBDIRS])
142 for dir in $CONF_SUBDIRS; do
143 DIST_MAKEFILE_LIST="${DIST_MAKEFILE_LIST}tests/$dir/Makefile "
145 AC_SUBST([DIST_MAKEFILE_LIST])
149 ## ---------------- ##
150 ## compiler checks. ##
151 ## ---------------- ##
153 # Use the specified CC and LD
160 # The Autoconf tests for C++ and Fortran 77 sometimes call AC_MSG_ERROR
161 # and we don't want that to be an error whilst creating the libtool script.
162 # As these are AC_REQUIREd inside libtool.m4 we can simply call them here
163 # and catch the errors now.
164 pushdef([AC_MSG_ERROR], [caught_CXX_error=yes])
167 popdef([AC_MSG_ERROR])
169 pushdef([AC_MSG_ERROR], [caught_F77_error=yes])
171 popdef([AC_MSG_ERROR])
174 ## ----------------------- ##
175 ## Libtool initialisation. ##
176 ## ----------------------- ##
177 LT_INIT([dlopen win32-dll])
180 # Enable all the language support we can
184 LT_LANG(Windows Resource)
187 ## --------------------------- ##
188 ## Work out which tests to run ##
189 ## --------------------------- ##
190 AM_CONDITIONAL(HAVE_CXX,
191 [test "X$caught_CXX_error" != "Xyes" &&
192 test -n "[$]_LT_AC_TAGVAR(compiler, CXX)"])
193 AM_CONDITIONAL(HAVE_F77,
194 [test "X$caught_F77_error" != "Xyes" &&
195 test -n "[$]_LT_AC_TAGVAR(compiler, F77)"])
196 AM_CONDITIONAL(HAVE_GCJ, [test -n "[$]_LT_AC_TAGVAR(compiler, GCJ)"])
197 AM_CONDITIONAL(HAVE_RC, [test -n "[$]_LT_AC_TAGVAR(compiler, RC)"])
203 AC_CONFIG_FILES([Makefile libltdl/Makefile libltdl/loaders/Makefile
204 doc/Makefile tests/Makefile])