diff options
-rw-r--r-- | configure.ac | 20 |
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. |