1# Process this file with autoconf to create configure. -*- autoconf -*-
2
3#   Copyright (C) 2001, 2004-2005, 2008, 2010-2015 Free Software
4#   Foundation, Inc.
5#   Written by Gary V. Vaughan, 2001
6#
7#   This file is part of GNU Libtool.
8#
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.
13#
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.
18#
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.
24####
25
26
27AC_PREREQ(2.62)
28dnl Oldest automake required for bootstrap is below in AM_INIT_AUTOMAKE.
29
30
31## ------------------------ ##
32## Autoconf initialisation. ##
33## ------------------------ ##
34AC_INIT([GNU Libtool],
35	m4_esyscmd([build-aux/git-version-gen .tarball-version]),
36	[bug-libtool@gnu.org])
37m4_ifndef([AC_PACKAGE_URL],
38	  [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/s/libtool/])])
39
40# Remove this when a released Autoconf is capable of bootstrapping
41# Libtool without it (probably after autoconf-2.70).
42m4_ifndef([AC_CONFIG_MACRO_DIRS],
43	  [m4_define([AC_CONFIG_MACRO_DIRS], m4_defn([AC_CONFIG_MACRO_DIR]))])
44
45# Since we already declare these directories in this file, save those
46# choices, and push the results into Makefile.am to avoid declaring
47# them in two places making renames error prone, and where copies
48# might get out of sync.
49m4_define([AC_CONFIG_AUX_DIR],
50     m4_defn([AC_CONFIG_AUX_DIR])[AC_SUBST([aux_dir], [$1])])
51m4_define([LT_CONFIG_LTDL_DIR],
52     m4_defn([LT_CONFIG_LTDL_DIR])[AC_SUBST([ltdl_dir], [$1])])
53m4_define([AC_CONFIG_MACRO_DIRS],
54     m4_defn([AC_CONFIG_MACRO_DIRS])[AC_SUBST([macro_dir], [$1])])
55
56AC_CONFIG_HEADERS([config.h:config-h.in])
57AC_CONFIG_SRCDIR([libtoolize.in])
58LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])
59AC_CONFIG_AUX_DIR([build-aux])
60AC_CONFIG_MACRO_DIRS([m4])
61AC_CONFIG_LIBOBJ_DIR([libltdl])
62
63package_revision=`$SHELL $ac_aux_dir/git-version-gen .tarball-version`
64AC_SUBST([package_revision])
65
66## ------------------------ ##
67## Autotest initialisation. ##
68## ------------------------ ##
69
70AC_CONFIG_TESTDIR([tests])
71AC_SUBST([AUTOM4TE], [${AUTOM4TE=autom4te}])
72AC_SUBST([AUTOTEST], ['$(AUTOM4TE) --language=autotest'])
73
74
75## ---------------------------------------- ##
76## Display a configure time version banner. ##
77## ---------------------------------------- ##
78
79# This is a sanity check so we can see what version is used in bug reports.
80AS_BOX([Configuring AC_PACKAGE_TARNAME AC_PACKAGE_VERSION])
81echo
82
83
84## ------------ ##
85## Shell tools. ##
86## ------------ ##
87
88AC_PROG_GNU_M4
89
90
91## ------------------------ ##
92## Automake Initialisation. ##
93## ------------------------ ##
94
95dnl These are bootstrap requirements! Once built, libtool may work with
96dnl much older releases of autoconf and automake.  See release notes.
97dnl 1.11 is needed for color-tests, 1.11.1 fixes a security issue.
98AM_INIT_AUTOMAKE([1.11.1 gnu subdir-objects dist-xz])
99AM_SILENT_RULES([yes])
100
101
102## ------------------------- ##
103## Autobuild initialisation. ##
104## ------------------------- ##
105
106# You can set autobuild_mode at configure time to specify a "unique"
107# string for this build.
108: ${autobuild_mode=default}
109AB_VERSION='AC_PACKAGE_VERSION'
110AB_INIT([$autobuild_mode])
111
112
113dnl Make sure config.status is regenerated when the version timestamp changes
114AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(srcdir)/.version'])
115
116
117## ------------------------------- ##
118## Libtool specific configuration. ##
119## ------------------------------- ##
120
121AC_SUBST([aclocaldir], ["\$(datadir)/aclocal"])
122AC_SUBST([pkgdatadir], ["\$(datadir)/$PACKAGE"])
123
124AC_ARG_ENABLE(ltdl-install,
125    [AS_HELP_STRING([--disable-ltdl-install], [do not install libltdl])])
126if test set != "${enable_ltdl_install+set}"; then
127  enable_ltdl_install=yes
128fi
129
130# The list of scripts required to build libltdl, and which need to be
131# installed by libtoolize --ltdl, and consequently need to be placed in
132# $pkgdatadir by our make install rule.
133pkgaux_scripts="compile config.guess config.sub depcomp install-sh missing"
134AC_SUBST([pkgaux_scripts])
135
136
137## ---------------- ##
138## compiler checks. ##
139## ---------------- ##
140
141# Need to be sure that we have a working C compiler, otherwise even with
142# a good C compiler: if the following C++ tests fail, the whole libtool
143# build fails!
144AC_PROG_CC
145GL_EARLY
146AM_PROG_CC_C_O
147AC_PROG_CPP
148
149## ----------------------- ##
150## Libtool initialisation. ##
151## ----------------------- ##
152LT_INIT([dlopen win32-dll])
153_LT_SET_OPTION([LTDL_INIT], [nonrecursive])
154_LTDL_SETUP
155
156# Enable all the language support we can
157LT_LANG(C++)
158LT_LANG(Fortran 77)
159LT_LANG(Fortran)
160LT_LANG(Go)
161LT_LANG(Java)
162LT_LANG(Windows Resource)
163
164# Ensure the correct file name (and path) conversion function
165# is available to the test suite.
166AC_SUBST([to_host_file_cmd])dnl
167AC_SUBST([to_tool_file_cmd])dnl
168
169# Propagate --with-aix-soname option to the testsuite.
170AC_SUBST([with_aix_soname])dnl
171
172## ---------------------- ##
173## Gnulib initialisation. ##
174## ---------------------- ##
175GL_INIT
176
177## ------------- ##
178## Documentation ##
179## ------------- ##
180AM_MISSING_PROG([HELP2MAN], [help2man])
181
182## -------- ##
183## Outputs. ##
184## -------- ##
185AC_CONFIG_FILES([Makefile])
186AC_OUTPUT
187