1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
From: Nathan Phillip Brink <binki@gentoo.org>
Subject: Fix broken perl detection somewhat.
--- a/configure.in
+++ b/configure.in
@@ -636,25 +636,27 @@
dnl
AC_MSG_CHECKING(whether to support Perl)
-AC_ARG_WITH(perl,
-[ --with-perl[=PATH] Compile with perl support.],
-[ test -z "$withval" && withval=yes ],
-)
-test "xno" != "x$withval" && for base in $withval /usr/local /usr /
-do
- FOUND=
- for ext in so a dll ; do
- test -r $base/lib/libperl.$ext && FOUND=1
- test -r $base/libperl.$ext && FOUND=1
- done
- test -n "$FOUND" || continue
- AC_MSG_RESULT(yes)
- LIBS="$LIBS `perl -MExtUtils::Embed -e ldopts`"
- PERLDOTOH="perl.o"
- AC_DEFINE(PERL)
- break
-done
-test -z "$PERLDOTOH" && AC_MSG_RESULT(no)
+AC_ARG_WITH([perl],
+ [AS_HELP_STRING([--with-perl[=PATH]], [Compile with perl support.])],
+ [],
+ [with_perl=maybe])
+AS_IF([test "xno" != "x$with_perl"],
+ [
+ PERL_LIBS="`perl -MExtUtils::Embed -e ldopts`"
+ AS_IF([test -n "$PERL_LIBS"],
+ [
+ AC_MSG_RESULT([yes])
+ LIBS="$LIBS $PERL_LIBS"
+ AC_DEFINE([PERL], [], [Define if perl support should be compiled])
+ PERLDOTOH="perl.o"
+ ],
+ [
+ AC_MSG_RESULT([no])
+ AS_IF([test "x$with_perl" != "xmaybe"],
+ [AC_MSG_ERROR([You specified --with-perl, but I was unable to find libperl])])
+ ])
+ ])
+
withval=''
dnl ----------------------------------------------------------
Diff finished. Thu Jun 30 22:15:26 2011
|