Skip to content

Commit

Permalink
Perl 5.10 is required
Browse files Browse the repository at this point in the history
  • Loading branch information
bigio committed Jul 4, 2024
1 parent c2ba695 commit ac18410
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 15 deletions.
30 changes: 20 additions & 10 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3964,6 +3964,9 @@ if test "$ac_have_clock_monotonic" = "yes" ; then

printf "%s\n" "#define HAVE_CLOCK_MONOTONIC /**/" >>confdefs.h

else
OLDLIBS="$LIBS"
LIBS="$LIBS -lrt"
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fPIC compiler option is accepted" >&5
Expand Down Expand Up @@ -3993,6 +3996,23 @@ printf "%s\n" "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

if test -z "$PERL" ; then
as_fn_error $? "*** Cannot continue without Perl. Sorry." "$LINENO" 5
exit 1
fi

if test -f "${PERL}" ; then
perl_version=`${PERL} -e "print $]"`
long_perl_version=`${PERL} -e "print ($] * 1000000)"`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
printf %s "checking Perl version... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${perl_version}" >&5
printf "%s\n" "${perl_version}" >&6; }
if test ${long_perl_version} -lt 5010000 ; then
as_fn_error $? "At least Perl 5.10 is required" "$LINENO" 5
fi
fi

for thing in prefix siteprefix vendorprefix vendorlib installarchlib installprivlib installbin installman1dir installman3dir installscript installsitearch installsitelib; do
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Perl installation variable $thing" >&5
printf %s "checking for Perl installation variable $thing... " >&6; }
Expand Down Expand Up @@ -4105,11 +4125,6 @@ printf "%s\n" "#define HAVE_WAIT3 1" >>confdefs.h
fi


if test -z "$PERL" ; then
as_fn_error $? "*** Cannot continue without Perl. Sorry." "$LINENO" 5
exit 1
fi

# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Expand Down Expand Up @@ -4622,11 +4637,6 @@ else
PTHREAD_FLAG=""
fi

if test "$GCC" = yes ; then
OLDLIBS="$LIBS"
LIBS="-lrt $LIBS"
fi

if test "$HAVE_EXTUTILS_EMBED" = "yes" ; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can embed a Perl interpreter in C" >&5
printf %s "checking if we can embed a Perl interpreter in C... " >&6; }
Expand Down
20 changes: 15 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[return 0;]])],
[AC_MSG_RESULT(no)
CFLAGS="$OLD_CFLAGS"])

if test -z "$PERL" ; then
AC_MSG_ERROR([*** Cannot continue without Perl. Sorry.])
exit 1
fi

if test -f "${PERL}" ; then
perl_version=`${PERL} -e "print $]"`
long_perl_version=`${PERL} -e "print ($] * 1000000)"`
AC_MSG_CHECKING([Perl version])
AC_MSG_RESULT(${perl_version})
if test ${long_perl_version} -lt 5010000 ; then
AC_MSG_ERROR([At least Perl 5.10 is required])
fi
fi

for thing in prefix siteprefix vendorprefix vendorlib installarchlib installprivlib installbin installman1dir installman3dir installscript installsitearch installsitelib; do
AC_MSG_CHECKING([for Perl installation variable $thing])
val=`$PERL -V:$thing | sed -e "s/^.*='//" -e "s/';$//"`
Expand All @@ -77,11 +92,6 @@ fi

AC_FUNC_WAIT3

if test -z "$PERL" ; then
AC_MSG_ERROR([*** Cannot continue without Perl. Sorry.])
exit 1
fi

AC_PATH_PROG(NM, nm)

dnl Allow user to tell us where Sendmail is (or will be)
Expand Down

0 comments on commit ac18410

Please sign in to comment.