1 # Process this file with autoconf to create configure. -*- autoconf -*-
3 # Copyright (C) 2001, 2004, 2005, 2008, 2010 Free Software Foundation,
5 # Written by Gary V. Vaughan, 2001
7 # This file is part of GNU Libtool.
9 # GNU Libtool is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation; either version 2 of
12 # the License, or (at your option) any later version.
14 # GNU Libtool is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with GNU Libtool; see the file COPYING. If not, a copy
21 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
22 # or obtained by writing to the Free Software Foundation, Inc.,
23 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 AC_PREREQ(2.62)dnl Some m4sh scripts use $as_echo
28 dnl Oldest automake required for bootstrap is below in AM_INIT_AUTOMAKE.
31 ## ------------------------ ##
32 ## Autoconf initialisation. ##
33 ## ------------------------ ##
34 AC_INIT([GNU Libtool], [2.4.2], [bug-libtool@gnu.org])
35 m4_ifndef([AC_PACKAGE_URL],
36 [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/software/libtool/])])
37 AC_CONFIG_HEADERS([config.h:config-h.in])
38 AC_CONFIG_SRCDIR([libtoolize.in])
39 LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])
40 AC_CONFIG_AUX_DIR([libltdl/config])
41 AC_CONFIG_MACRO_DIR([libltdl/m4])
42 AC_CONFIG_LIBOBJ_DIR([libltdl])
45 ## ------------------------ ##
46 ## Autotest initialisation. ##
47 ## ------------------------ ##
49 AC_CONFIG_TESTDIR([tests])
50 AC_SUBST([AUTOM4TE], [${AUTOM4TE=autom4te}])
51 AC_SUBST([AUTOTEST], ['$(AUTOM4TE) --language=autotest'])
54 ## ---------------------------------------- ##
55 ## Display a configure time version banner. ##
56 ## ---------------------------------------- ##
58 # Calculating the previous version is somewhat involved, so do it once
59 # here, and SUBST the result for the maintainer release rules. The
60 # versioning scheme we use is described here:
61 # http://www.gnu.org/software/libtool/contribute.html
63 # First we break the version number up into its constituent parts.
64 lt_major=`echo "AC_PACKAGE_VERSION" | sed ['s,\..*$,,g']`
65 lt_minor=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.\([0-9]*\).*$,\1,']`
66 lt_micro=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.[0-9]*\(\.[0-9]*\).*$,\1,']`
67 lt_alpha=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9.]*,,']`
69 test "$lt_minor" = "AC_PACKAGE_VERSION" && lt_minor=0
70 test "$lt_micro" = "AC_PACKAGE_VERSION" && lt_micro=""
72 # Then we try to work out what the release before this one would have been
73 # numbered. The only time we come unstuck is when this is the first release
74 # from a stable branch (lt_micro=lt_alpha=""), so LASTRELEASE is the last
75 # release from the old stable branch, and we don't know what version that
76 # was, so leave it unset so that the Makefile can complain.
81 LASTRELEASE="$lt_major.$lt_minor" ;;
83 LASTRELEASE="$lt_major.$lt_minor$lt_micro" ;;
87 LASTRELEASE=`echo "AC_PACKAGE_VERSION" | tr 'c-y' 'b-w'` ;;
89 LASTRELEASE=`echo "AC_PACKAGE_VERSION" | tr 'd-z' 'b-x'` ;;
90 *) # No lt_alpha component
95 LASTRELEASE="$lt_major.$lt_minor" ;;
97 lt_micro_value=`echo $lt_micro | sed 's,^\.,,'`
98 LASTRELEASE="$lt_major.$lt_minor.`expr $lt_micro_value - 1`" ;;
104 AC_SUBST([LASTRELEASE])
106 # This is a sanity check so we can see which version is used in bug reports.
107 # It is assumed that we only want to see the date extension for cvs libtool
108 # versions (i.e. "odd" letters) and not actual alpha releases.
109 TIMESTAMP=`${CONFIG_SHELL} ${ac_aux_dir}/mkstamp ${srcdir}`
110 package_revision=`( set $TIMESTAMP; echo $1; )`
112 ""|[[bdfhjlnprtvxz]])
116 timestamp_string="${TIMESTAMP:+ (Build:$TIMESTAMP)}"
117 AS_BOX([Configuring AC_PACKAGE_TARNAME$timestamp_string AC_PACKAGE_VERSION])
119 AC_SUBST([TIMESTAMP])
120 AC_SUBST([package_revision])
123 ## ------------------------ ##
124 ## Automake Initialisation. ##
125 ## ------------------------ ##
127 dnl These are bootstrap requirements! Once built, libtool may work with
128 dnl much older releases of autoconf and automake. See release notes.
129 dnl 1.11 is needed for color-tests, 1.11.1 fixes a security issue.
130 AM_INIT_AUTOMAKE([1.11.1 gnu subdir-objects dist-xz color-tests parallel-tests])
133 ## ------------------------- ##
134 ## Autobuild initialisation. ##
135 ## ------------------------- ##
137 # You can set autobuild_mode at configure time to specify a "unique"
138 # string for this build.
139 : ${autobuild_mode=default}
140 AB_VERSION="AC_PACKAGE_VERSION ($TIMESTAMP)"
141 AB_INIT([$autobuild_mode])
144 dnl We use m4sh to generate libtool's portable shell scripts
145 AC_SUBST([M4SH], ['$(AUTOM4TE) --language=m4sh'])
147 dnl Make sure config.status is regenerated when the version timestamp changes
148 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/ChangeLog'])
151 ## ------------------------------- ##
152 ## Libtool specific configuration. ##
153 ## ------------------------------- ##
155 AC_SUBST([aclocaldir], ["\${datadir}/aclocal"])
156 AC_SUBST([pkgdatadir], ["\${datadir}/$PACKAGE"])
158 AC_ARG_ENABLE(ltdl-install,
159 [AS_HELP_STRING([--disable-ltdl-install], [do not install libltdl])])
160 if test x"${enable_ltdl_install+set}" != xset; then
161 enable_ltdl_install=yes
164 # All subdirectories that are configured on demand, but that must be
165 # included in the distribution.
166 CONF_SUBDIRS="tests/cdemo tests/demo tests/depdemo tests/f77demo tests/fcdemo \
167 tests/mdemo tests/mdemo2 tests/pdemo tests/tagdemo"
168 AC_SUBST([CONF_SUBDIRS])
171 for dir in $CONF_SUBDIRS; do
172 DIST_MAKEFILE_LIST="${DIST_MAKEFILE_LIST}$dir/Makefile "
174 AC_SUBST([DIST_MAKEFILE_LIST])
177 ## ---------------- ##
178 ## compiler checks. ##
179 ## ---------------- ##
181 # Need to be sure that we have a working C compiler, otherwise even with
182 # a good C compiler: if the following C++ tests fail, the whole libtool
188 ## ----------------------- ##
189 ## Libtool initialisation. ##
190 ## ----------------------- ##
191 LT_INIT([dlopen win32-dll])
192 _LT_SET_OPTION([LTDL_INIT], [nonrecursive])
195 # Enable all the language support we can
201 LT_LANG(Windows Resource)
203 # Ensure the correct file name (and path) conversion function
204 # is available to the test suite.
205 AC_SUBST([to_host_file_cmd])dnl
206 AC_SUBST([to_tool_file_cmd])dnl
208 ## --------------------------- ##
209 ## Work out which tests to run ##
210 ## --------------------------- ##
211 AM_CONDITIONAL(HAVE_CXX,[test -n "[$]_LT_TAGVAR(compiler, CXX)"])
212 AM_CONDITIONAL(HAVE_F77,[test -n "[$]_LT_TAGVAR(compiler, F77)"])
213 AM_CONDITIONAL(HAVE_FC,[test -n "[$]_LT_TAGVAR(compiler, FC)"])
214 AM_CONDITIONAL(HAVE_GCJ, [test -n "[$]_LT_TAGVAR(compiler, GCJ)"])
215 AM_CONDITIONAL(HAVE_RC, [test -n "[$]_LT_TAGVAR(compiler, RC)"])
217 ## Whether `make' supports order-only prerequisites.
218 AC_CACHE_CHECK([whether ${MAKE-make} supports order-only prerequisites],
219 [lt_cv_make_order_only],
230 if ${MAKE-make} -s -q -f confmk >/dev/null 2>&1; then
231 lt_cv_make_order_only=yes
233 lt_cv_make_order_only=no
238 if test $lt_cv_make_order_only = yes; then
248 AM_MISSING_PROG([HELP2MAN], [help2man])
253 AC_CONFIG_FILES([Makefile])