Masato Taruishi
taru****@users*****
2004年 10月 13日 (水) 17:49:26 JST
=================================================================== RCS file: ultrapossum/Makefile.am,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- ultrapossum/Makefile.am 2004/10/13 08:15:49 1.29 +++ ultrapossum/Makefile.am 2004/10/13 08:49:25 1.30 @@ -47,15 +47,13 @@ CONFIGS = ultrapossum.cf default.cf config.cf -perl/Makefile: - cd perl && perl Makefile.PL -# cd perl && perl Makefile.PL INSTALLDIRS=vendor - perl/blib/man3/UltraPossum.3pm: perl/Makefile $(MAKE) && $(MAKE) test -# support perl 5.8.0 limitation -ABS_DESTDIR = `if test -n "$(DESTDIR)"; then cd $(DESTDIR) > /dev/null; echo "PREFIX=$(pwd)/@prefix@ SITEPREFIX=$(pwd)/@prefix@"; fi` + +ABS_DESTDIR = `if test -n "$(DESTDIR)"; then cd $(DESTDIR) > /dev/null; pwd; fi` + +PERL_PREFIX = `if test -n "$(DESTDIR)"; then cd $(DESTDIR) > /dev/null; echo "PREFIX=$(pwd)/@prefix@ SITEPREFIX=$(pwd)/@prefix@"; fi` install-data-local: perl/blib/man3/UltraPossum.3pm @@ -63,8 +61,11 @@ $(mkinstalldirs) $(DESTDIR)/$(sysconfdir)/$(PACKAGE)/projects/ $(mkinstalldirs) $(DESTDIR)/$(sysconfdir)/$(PACKAGE)/apps/ -# $(MAKE) -C perl DESTDIR=$(ABS_DESTDIR) install - -$(MAKE) -C perl $(ABS_DESTDIR) install +if PERL_SUPPORT_DESTDIR + $(MAKE) -C perl DESTDIR=$(ABS_DESTDIR) install +else + -$(MAKE) -C perl $(PERL_PREFIX) install +endif for f in $(CONFIGS); do \ if test -f $(DESTDIR)/$(sysconfdir)/$(PACKAGE)/$$f; then \ =================================================================== RCS file: ultrapossum/configure.in,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- ultrapossum/configure.in 2004/10/12 08:02:06 1.57 +++ ultrapossum/configure.in 2004/10/13 08:49:25 1.58 @@ -9,6 +9,14 @@ # Checks for programs. AC_PROG_INSTALL +AC_CHECK_PROGS(perl, perl ) +if test "x$perl" != "x"; then + AC_MSG_CHECKING(for perl version) + perlver=`$perl -v | grep 'This is perl' | cut -d' ' -f4 | tr -d v` + AC_MSG_RESULT([$perlver]) + v="`echo $perlver | tr -d .`" + AM_CONDITIONAL(PERL_SUPPORT_DESTDIR, test $v -ge 583) +fi # Checks for libraries. @@ -242,6 +250,11 @@ AC_CONFIG_FILES([test/run test/Makefile Makefile init.d/Makefile module/test/Makefile module/test/test.d/Makefile module/ultrapossum.am module/failover/heartbeat/Makefile modules ultrapossum-config module/Makefile module/client/Makefile module/server/Makefile module/failover/Makefile module/startTLS/Makefile module/dnsbalance/Makefile module/vaj-robust/Makefile config/Makefile config/ldap/Makefile ultrapossum-server]) AC_OUTPUT +if test "x$perlver" = "x5.8.4"; then + cd perl && $perl Makefile.PL INSTALLDIRS=vendor +else + cd perl && $perl Makefile.PL +fi if include "startTLS" "$modules"; then echo "startTLS plugin will be used which includes software" echo " developed by the OpenSSL Project for use in the OpenSSL"