[Open-scap] [PATCH 1/1] Fix detection of Perl includes in configure script

Pierre Chifflier p.chifflier at inl.fr
Sun May 10 16:15:09 UTC 2009


From: Pierre Chifflier <chifflier at inl.fr>

On some distros, 'perl -V:ccdlflags' returns a list of flags which
can be empty.
To detect the path to EXTERN.h correctly, the config module can be
used to find the path to Perl installation dir in
$Config{archlib}/CORE

Signed-off-by: Pierre Chifflier <chifflier at inl.fr>
---
 configure.ac |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 606c0b0..3c46fa6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,7 +103,9 @@ AC_CHECK_HEADERS(
 )
 CPPFLAGS="$CPPFLAGS_SAVE"
 
-AC_SUBST([PERL_INCLUDES], ["`perl -V:ccdlflags | cut -d\' -f2 | cut -d\, -f4`"])
+AC_PATH_PROG(PERL, perl)
+PERL_INCLUDES="`$PERL -e 'use Config; print $Config{archlib}'`/CORE"
+AC_SUBST([PERL_INCLUDES], ["$PERL_INCLUDES"])
 
 eval $(perl -V:vendorlib | sed "s|'$(perl -V:prefix | sed -n 's|^prefix=.\(.*\).;|\1|p')|'|")
 eval $(perl -V:vendorarch | sed "s|'$(perl -V:prefix | sed -n 's|^prefix=.\(.*\).;|\1|p')|'|")
-- 
1.6.2.4




More information about the Open-scap-list mailing list