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.
23 AM_INIT_AUTOMAKE([-Wall -Werror -Wno-override dist-bzip2 foreign])
26 dnl Check for perl on our system.
27 dnl Call to AC_SUBST(PERL) is implicit
28 AC_PATH_PROGS([PERL], [perl] [perl5], [false])
29 if test "x$PERL" = xfalse
31 AC_MSG_ERROR([Perl not found; check your \$PATH.])
35 for mod in Test::More Test::Output; do
36 AC_MSG_CHECKING([$mod])
37 if $PERL -M$mod -e 1 2>/dev/null
42 missing_test_deps="$missing_test_deps $mod"
46 # N.B. ${var#pattern} will not work with some shells, such as
47 # Solaris 10's /bin/sh :-(
49 # http://www.gnu.org/software/autoconf/manual/autoconf.html#Portable-Shell
51 # eval `$PERL -V:siteprefix -V:installsitelib`
52 # pmdir_relative_path="${installsitelib#$siteprefix/}"
56 # pmdir_relative_path=`echo "${installsitelib}" | sed -e "s!^$siteprefix/!!"`
58 # but this is cleaner:
59 pmdir_relative_path=`\
61 -wle '($_ = $Config{installsitelib})
62 =~ s!^\Q$Config{siteprefix}/!!; \
69 [Install Perl modules in DIR]),
71 [PMDIR='${prefix}'/"$pmdir_relative_path"])
72 AC_CONFIG_COMMANDS_POST([[
76 # Perl modules will be installed to $PMDIR
78 if [ "$pmdir" != "$PMDIR" ]; then
80 # which will expand to
84 # unless you override the value of prefix at make-time.
89 if test -n "$missing_test_deps"; then
91 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
92 ! WARNING! $PERL was missing modules:
96 ! The test suite will fail. 'make install' may still render
97 ! a working installation, but this cannot be guaranteed.
99 ! Please (re-)read INSTALL, then install the missing modules
101 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
104 if test -n "$STRICT_TESTS"; then
111 AC_CONFIG_FILES([Makefile])