1 dnl This file is part of GNU Stow.
3 dnl GNU Stow is free software: you can redistribute it and/or modify it
4 dnl under the terms of the GNU General Public License as published by
5 dnl the Free Software Foundation, either version 3 of the License, or
6 dnl (at your option) any later version.
8 dnl GNU Stow is distributed in the hope that it will be useful, but
9 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 dnl General Public License for more details.
13 dnl You should have received a copy of the GNU General Public License
14 dnl along with this program. If not, see https://www.gnu.org/licenses/.
16 dnl Process this file with Autoconf to produce configure dnl
18 AC_INIT([stow], [2.3.2], [bug-stow@gnu.org])
20 AC_CONFIG_AUX_DIR([automake])
21 # Unfortunately we have to disable warnings for overrides, because we
22 # need to override the built-in `check-TESTS' rule and also the TEXI2DVI
24 AM_INIT_AUTOMAKE([-Wall -Werror -Wno-override dist-bzip2 foreign])
27 dnl Check for perl on our system.
28 dnl Call to AC_SUBST(PERL) is implicit
29 AC_PATH_PROGS([PERL], [perl] [perl5], [false])
30 if test "x$PERL" = xfalse
32 AC_MSG_ERROR([Perl not found; check your \$PATH.])
36 for mod in Test::More Test::Output; do
37 AC_MSG_CHECKING([$mod])
38 if $PERL -M$mod -e 1 2>/dev/null
43 missing_test_deps="$missing_test_deps $mod"
47 # N.B. ${var#pattern} will not work with some shells, such as
48 # Solaris 10's /bin/sh :-(
50 # http://www.gnu.org/software/autoconf/manual/autoconf.html#Portable-Shell
52 # eval `$PERL -V:siteprefix -V:installsitelib`
53 # pmdir_relative_path="${installsitelib#$siteprefix/}"
57 # pmdir_relative_path=`echo "${installsitelib}" | sed -e "s!^$siteprefix/!!"`
59 # but this is cleaner:
60 pmdir_relative_path=`\
62 -wle '($_ = $Config{installsitelib})
63 =~ s!^\Q$Config{siteprefix}/!!; \
70 [Install Perl modules in DIR]),
72 [PMDIR='${prefix}'/"$pmdir_relative_path"])
73 AC_CONFIG_COMMANDS_POST([[
77 # Perl modules will be installed to $PMDIR
79 if [ "$pmdir" != "$PMDIR" ]; then
81 # which will expand to
85 # unless you override the value of prefix at make-time.
90 if test -n "$missing_test_deps"; then
92 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
93 ! WARNING! $PERL was missing modules:
97 ! The test suite will fail. 'make install' may still render
98 ! a working installation, but this cannot be guaranteed.
100 ! Please (re-)read INSTALL, then install the missing modules
102 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
105 if test -n "$STRICT_TESTS"; then
112 AC_CONFIG_FILES([Makefile])