* ltmain.in: Always use $echo not echo for consistency.
[libtool.git] / configure.ac
blob7126e75a9fb6ffae0a201c0daf8196dcf56057bf
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)
56 AM_CONFIG_HEADER([config.h:config-h.in])
59 ## ------------------------------- ##
60 ## Libtool specific configuration. ##
61 ## ------------------------------- ##
62 pkgdatadir='${datadir}'"/${PACKAGE}"
63 AC_SUBST([pkgdatadir]) # automake does not need this, but libtoolize does
65 aclocaldir='${datadir}/aclocal'
66 AC_SUBST([aclocaldir])
68 AC_ARG_ENABLE(ltdl-install,
69     [AC_HELP_STRING([--disable-ltdl-install], [do not install libltdl])])
70 if test x"${enable_ltdl_install+set}" != xset; then
71   enable_ltdl_install=yes
72   ac_configure_args="$ac_configure_args --enable-ltdl-install"
74 AC_CONFIG_SUBDIRS([libltdl])
76 # all subdirectories that are configured on demand, but that must be
77 # included in the distribution
78 CONF_SUBDIRS="cdemo pdemo demo depdemo mdemo tagdemo f77demo"
79 AC_SUBST([CONF_SUBDIRS])
81 ACINCLUDE_M4_LIST="${srcdir}/acinclude.m4"
82 DIST_MAKEFILE_LIST=
83 for dir in $CONF_SUBDIRS; do
84   ACINCLUDE_M4_LIST="$ACINCLUDE_M4_LIST ${srcdir}/$dir/acinclude.m4"
85   DIST_MAKEFILE_LIST="$DIST_MAKEFILE_LIST$dir/Makefile "
86 done
87 AC_SUBST([ACINCLUDE_M4_LIST])
88 AC_SUBST([DIST_MAKEFILE_LIST])
92 ## ---------------- ##
93 ## compiler checks. ##
94 ## ---------------- ##
96 # Use the specified CC and LD
97 AC_PROG_CC
98 AC_EXEEXT
99 AM_PROG_LD
100 AC_SUBST(LD)
101 AM_PROG_NM
102 AC_SUBST(NM)
103 AC_PROG_LN_S
105 pushdef([AC_MSG_ERROR], [CXX=no])
106 AC_PROG_CXX
107 popdef([AC_MSG_ERROR])
108 AM_CONDITIONAL(HAVE_CXX, [test "x$CXX" != xno])
110 pushdef([AC_MSG_ERROR], [F77=no])
111 AC_PROG_F77
112 popdef([AC_MSG_ERROR])
113 if test -z "$F77"; then
114   F77="no"
116 AM_CONDITIONAL(HAVE_F77, [test "x$F77" != xno])
118 LT_AC_PROG_GCJ
119 AM_CONDITIONAL(HAVE_GCJ, [test "x$GCJ" != xno])
121 LT_AC_PROG_RC
122 AM_CONDITIONAL(HAVE_RC, [test "x$RC" != xno])
126 ## ----------------------- ##
127 ## Libtool initialisation. ##
128 ## ----------------------- ##
129 AC_LIBTOOL_DLOPEN
130 AC_LIBTOOL_WIN32_DLL
131 AC_PROG_LIBTOOL
135 ## -------- ##
136 ## Outputs. ##
137 ## -------- ##
138 AC_CONFIG_FILES([Makefile doc/Makefile tests/Makefile])
139 AC_OUTPUT