summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-03-04 22:47:59 +0000
committerChris Wilson <chris+github@qwirx.com>2007-03-04 22:47:59 +0000
commitafe9f791b6f0a8a3819a53e9fc0a8676b3b6b9f8 (patch)
tree5b9ae4abc30fbf24fec270afa2f24ef93489de60 /configure.ac
parent8c8bdcd7d23f6cf1cdf533a03e2987abb4011087 (diff)
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)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 14 insertions, 6 deletions
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.