* libtool.m4: if ZSH_VERSION is set then setopt NO_GLOB_SUBST so
[libtool.git] / configure.ac
blobeecb0374c86666acfc30ada5a7e5157f175b27ff
1 ## Process this file with autoconf to create configure. -*- autoconf -*-
2 # Copyright 2001  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
17 # 02111-1307  USA
20 ## FIXME: Is this really new enough? ##
21 AC_PREREQ(2.50)
25 ## ------------------------ ##
26 ## Autoconf initialisation. ##
27 ## ------------------------ ##
28 AC_INIT([libtool], [1.4e], [bug-libtool@gnu.org])
29 AC_CONFIG_SRCDIR([ltmain.in])
33 ## ---------------------------------------- ##
34 ## Display a configure time version banner. ##
35 ## ---------------------------------------- ##
37 # This is a sanity check so we can see which version is used in bug reports.
38 # It is assumed that we only want to see the date extension for cvs libtool
39 # versions (i.e. "odd" letters) and not actual alpha releases.
40 TIMESTAMP=
41 case AC_PACKAGE_VERSION in
42   [*[acegikmoqsuwy])]
43     TIMESTAMP=`${CONFIG_SHELL} ${srcdir}/mkstamp < ${srcdir}/ChangeLog`
44     AS_BOX([Configuring AC_PACKAGE_TARNAME AC_PACKAGE_VERSION$TIMESTAMP])
45     echo
46     ;;
47 esac
48 AC_SUBST([TIMESTAMP])
52 ## ------------------------ ##
53 ## Automake Initialisation. ##
54 ## ------------------------ ##
55 AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION)
58 ## ------------------------------- ##
59 ## Libtool specific configuration. ##
60 ## ------------------------------- ##
61 pkgdatadir='${datadir}'"/${PACKAGE}"
62 AC_SUBST([pkgdatadir]) # automake does not need this, but libtoolize does
64 aclocaldir='${datadir}/aclocal'
65 AC_SUBST([aclocaldir])
67 AC_ARG_ENABLE(ltdl-install,
68     [AC_HELP_STRING([--disable-ltdl-install], [do not install libltdl])])
69 if test x"${enable_ltdl_install+set}" != xset; then
70   enable_ltdl_install=yes
71   ac_configure_args="$ac_configure_args --enable-ltdl-install"
73 AC_CONFIG_SUBDIRS([libltdl])
75 # all subdirectories that are configured on demand, but that must be
76 # included in the distribution
77 CONF_SUBDIRS="cdemo pdemo demo depdemo mdemo tagdemo f77demo"
78 AC_SUBST([CONF_SUBDIRS])
80 ACINCLUDE_M4_LIST="${srcdir}/acinclude.m4"
81 DIST_MAKEFILE_LIST=
82 for dir in $CONF_SUBDIRS; do
83   ACINCLUDE_M4_LIST="$ACINCLUDE_M4_LIST ${srcdir}/$dir/acinclude.m4"
84   DIST_MAKEFILE_LIST="$DIST_MAKEFILE_LIST$dir/Makefile "
85 done
86 AC_SUBST([ACINCLUDE_M4_LIST])
87 AC_SUBST([DIST_MAKEFILE_LIST])
91 ## ---------------- ##
92 ## compiler checks. ##
93 ## ---------------- ##
95 # Use the specified CC and LD
96 AC_PROG_CC
97 AC_EXEEXT
98 AM_PROG_LD
99 AC_SUBST(LD)
100 AM_PROG_NM
101 AC_SUBST(NM)
102 AC_PROG_LN_S
104 pushdef([AC_MSG_ERROR], [CXX=no])
105 AC_PROG_CXX
106 popdef([AC_MSG_ERROR])
107 AM_CONDITIONAL(HAVE_CXX, [test "x$CXX" != xno])
109 pushdef([AC_MSG_ERROR], [F77=no])
110 AC_PROG_F77
111 popdef([AC_MSG_ERROR])
112 if test -z "$F77"; then
113   F77="no"
115 AM_CONDITIONAL(HAVE_F77, [test "x$F77" != xno])
117 LT_AC_PROG_GCJ
118 AM_CONDITIONAL(HAVE_GCJ, [test "x$GCJ" != xno])
120 LT_AC_PROG_RC
121 AM_CONDITIONAL(HAVE_RC, [test "x$RC" != xno])
125 ## ----------------------- ##
126 ## Libtool initialisation. ##
127 ## ----------------------- ##
128 AC_LIBTOOL_DLOPEN
129 AC_LIBTOOL_WIN32_DLL
130 AC_PROG_LIBTOOL
134 ## -------- ##
135 ## Outputs. ##
136 ## -------- ##
137 AC_CONFIG_FILES([Makefile doc/Makefile tests/Makefile])
138 AC_OUTPUT