[Box Backup-dev] COMMIT r683 - box/chris/general

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Sun, 23 Jul 2006 22:22:49 +0000 (GMT)


Author: chris
Date: 2006-07-23 22:22:47 +0000 (Sun, 23 Jul 2006)
New Revision: 683

Modified:
   box/chris/general/configure.ac
Log:
* configure.ac
- Don't use /usr/bin/perl as the PERL_EXECUTABLE on Windows, because the
  tests won't find it. They need a native path ("C:\Perl\perl"), or we
  must assume that perl is on their PATH. I've done the latter here.


Modified: box/chris/general/configure.ac
===================================================================
--- box/chris/general/configure.ac	2006-07-23 22:19:56 UTC (rev 682)
+++ box/chris/general/configure.ac	2006-07-23 22:22:47 UTC (rev 683)
@@ -26,14 +26,19 @@
   # 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*) 
+	AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["perl"], [Command to run Perl])
+	;;
+*)
+	AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$PERL"], 
+		[Location of the perl executable])
+	;;
+esac
+
 ### Checks for libraries.
 
 case $target_os in