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