ltmain.in: Use func_warning for all warnings
[libtool.git] / configure.ac
blob9aef55d3712e0003d652bc1d4f12178a3b9458e3
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; 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 ####
27 AC_PREREQ(2.64)
28 dnl Oldest automake required for bootstrap is below in AM_INIT_AUTOMAKE.
31 ## ------------------------ ##
32 ## Autoconf initialisation. ##
33 ## ------------------------ ##
34 AC_INIT([GNU Libtool],
35         m4_esyscmd([build-aux/git-version-gen .tarball-version]),
36         [bug-libtool@gnu.org])
37 m4_ifndef([AC_PACKAGE_URL],
38           [AC_SUBST([PACKAGE_URL], [https://www.gnu.org/s/libtool/])])
40 # Remove this when a released Autoconf is capable of bootstrapping
41 # Libtool without it (probably after autoconf-2.70).
42 m4_ifndef([AC_CONFIG_MACRO_DIRS],
43           [m4_define([AC_CONFIG_MACRO_DIRS], m4_defn([AC_CONFIG_MACRO_DIR]))])
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.
49 m4_define([AC_CONFIG_AUX_DIR],
50      m4_defn([AC_CONFIG_AUX_DIR])[AC_SUBST([aux_dir], [$1])])
51 m4_define([LT_CONFIG_LTDL_DIR],
52      m4_defn([LT_CONFIG_LTDL_DIR])[AC_SUBST([ltdl_dir], [$1])])
53 m4_define([AC_CONFIG_MACRO_DIRS],
54      m4_defn([AC_CONFIG_MACRO_DIRS])[AC_SUBST([macro_dir], [$1])])
56 AC_CONFIG_HEADERS([config.h:config-h.in])
57 AC_CONFIG_SRCDIR([libtoolize.in])
58 LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive])
59 AC_CONFIG_AUX_DIR([build-aux])
60 AC_CONFIG_MACRO_DIRS([m4])
61 AC_CONFIG_LIBOBJ_DIR([libltdl])
63 package_revision=`$SHELL $ac_aux_dir/git-version-gen .tarball-version`
64 AC_SUBST([package_revision])
66 ## ------------------------ ##
67 ## Autotest initialisation. ##
68 ## ------------------------ ##
70 AC_CONFIG_TESTDIR([tests])
71 AC_SUBST([AUTOM4TE], [${AUTOM4TE=autom4te}])
72 AC_SUBST([AUTOTEST], ['$(AUTOM4TE) --language=autotest'])
75 ## ---------------------------------------- ##
76 ## Display a configure time version banner. ##
77 ## ---------------------------------------- ##
79 # This is a sanity check so we can see what version is used in bug reports.
80 AS_BOX([Configuring AC_PACKAGE_TARNAME AC_PACKAGE_VERSION])
81 echo
84 ## ------------ ##
85 ## Shell tools. ##
86 ## ------------ ##
88 AC_PROG_GNU_M4
91 ## ------------------------ ##
92 ## Automake Initialisation. ##
93 ## ------------------------ ##
95 dnl These are bootstrap requirements! Once built, libtool may work with
96 dnl much older releases of autoconf and automake.  See release notes.
97 dnl 1.11 is needed for color-tests, 1.11.1 fixes a security issue.
98 AM_INIT_AUTOMAKE([1.11.1 gnu subdir-objects dist-xz])
99 AM_SILENT_RULES([yes])
102 ## ------------------------- ##
103 ## Autobuild initialisation. ##
104 ## ------------------------- ##
106 # You can set autobuild_mode at configure time to specify a "unique"
107 # string for this build.
108 : ${autobuild_mode=default}
109 AB_VERSION='AC_PACKAGE_VERSION'
110 AB_INIT([$autobuild_mode])
113 dnl Make sure config.status is regenerated when the version timestamp changes
114 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/.version'])
117 ## ------------------------------- ##
118 ## Libtool specific configuration. ##
119 ## ------------------------------- ##
121 AC_SUBST([aclocaldir], ["\$(datadir)/aclocal"])
122 AC_SUBST([pkgdatadir], ["\$(datadir)/$PACKAGE"])
124 AC_ARG_ENABLE(ltdl-install,
125     [AS_HELP_STRING([--disable-ltdl-install], [do not install libltdl])])
126 if test set != "${enable_ltdl_install+set}"; then
127   enable_ltdl_install=yes
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.
133 pkgaux_scripts="compile config.guess config.sub depcomp install-sh missing"
134 AC_SUBST([pkgaux_scripts])
137 ## ---------------- ##
138 ## compiler checks. ##
139 ## ---------------- ##
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!
144 AC_PROG_CC
145 GL_EARLY
146 AM_PROG_CC_C_O
147 AC_PROG_CPP
149 ## ----------------------- ##
150 ## Libtool initialisation. ##
151 ## ----------------------- ##
152 LT_INIT([dlopen win32-dll])
153 _LT_SET_OPTION([LTDL_INIT], [nonrecursive])
154 _LTDL_SETUP
156 # Enable all the language support we can
157 LT_LANG(C++)
158 LT_LANG(Fortran 77)
159 LT_LANG(Fortran)
160 LT_LANG(Go)
161 LT_LANG(Java)
162 LT_LANG(Windows Resource)
164 # Ensure the correct file name (and path) conversion function
165 # is available to the test suite.
166 AC_SUBST([to_host_file_cmd])dnl
167 AC_SUBST([to_tool_file_cmd])dnl
169 # Propagate --with-aix-soname option to the testsuite.
170 AC_SUBST([with_aix_soname])dnl
172 ## ---------------------- ##
173 ## Gnulib initialisation. ##
174 ## ---------------------- ##
175 GL_INIT
177 ## ------------- ##
178 ## Documentation ##
179 ## ------------- ##
180 AM_MISSING_PROG([HELP2MAN], [help2man])
182 ## -------- ##
183 ## Outputs. ##
184 ## -------- ##
185 AC_CONFIG_FILES([Makefile gnulib-tests/Makefile])
186 AC_OUTPUT