From afe9f791b6f0a8a3819a53e9fc0a8676b3b6b9f8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 4 Mar 2007 22:47:59 +0000 Subject: Simplify check for PERL Define substitution TARGET_PERL and preprocessor PERL_EXECUTABLE to a native Perl (not Cygwin) on Win32, since Cygwin perl will not run inside bbackupd for unit tests (e.g. SyncAllowScript). (refs #3) --- configure.ac | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2eaa232e..e0958219 100644 --- a/configure.ac +++ b/configure.ac @@ -26,13 +26,21 @@ if test "x$GXX" = "xyes"; then # Use -rdynamic if we have gcc. This is needed for backtrace AC_SUBST([LDADD_RDYNAMIC], ['-rdynamic']) fi -AC_PATH_PROG([PERL], [perl], [no]) -if test "x$PERL" != "xno"; then - AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$PERL"], [Location of the perl executable]) -else - AC_MSG_ERROR([[perl executable was not found]]) -fi +AC_PATH_PROG([PERL], [perl], [AC_MSG_ERROR([[perl executable was not found]])]) + +case $target_os in +mingw*) + TARGET_PERL=perl + ;; +*) + TARGET_PERL=$PERL + ;; +esac + +AC_SUBST([TARGET_PERL]) +AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$TARGET_PERL"], + [Location of the perl executable]) ### Checks for libraries. -- cgit v1.2.3