Joaquin Cuenca Abela wrote:
>
> Frodo, I've just started to finish the make install
And so did I :-(
> just checking that we're not stepping in each other foot... :)
Included below the (not-committed) diffs. Please integrate it with yours
and commit it!
Thanks,
Frodo
--
Frodo Looijaard <[EMAIL PROTECTED]> PGP key and more: http://huizen.dds.nl/~frodol
Defenestration n. (formal or joc.):
The act of removing Windows from your computer in disgust, usually followed
by the installation of Linux or some other Unix-like operating system.
Index: configure.ac
===================================================================
RCS file: /cvsroot/abi/configure.ac,v
retrieving revision 1.26
diff -u -2 -r1.26 configure.ac
--- configure.ac 2002/01/28 08:59:24 1.26
+++ configure.ac 2002/02/07 21:47:21
@@ -236,4 +236,89 @@
esac],[peerconfig=true])
+# Check for perl
+AC_ARG_WITH(perl,
+ [ --with-perl=PATH Specify a path to the perl interpreter (autodetect) ],
+ [case "${withval}" in
+ yes) WITH_PERL=true; PERL="" ;;
+ no) WITH_PERL=false ;;
+ *) WITH_PERL=true; PERL="$withval" ;;
+ esac],[WITH_PERL=true; PERL=""])
+
+if test "$WITH_PERL" = true; then
+ if test "x${PERL}" = x; then
+ AC_PATH_PROG(PERL,perl)
+ else
+ AC_MSG_CHECKING(perl)
+ AC_MSG_RESULT(not found)
+ fi
+ if test "x${PERL}" = x; then
+ WITH_PERL=false
+ else
+ AC_MSG_CHECKING(perl executable)
+ if $PERL -V >/dev/null 2>&1; then
+ AC_MSG_RESULT(OK)
+ else
+ AC_MSG_RESULT(failed)
+ WITH_PERL=false
+ fi
+ fi
+fi
+
+if test $WITH_PERL = true; then
+ AC_PATH_PROG(POD2MAN,pod2man)
+ if test x"$POD2MAN" = x; then
+ WITH_PERL=false
+ fi
+fi
+
+if test $WITH_PERL = true; then
+ AC_MSG_CHECKING(perl privlib)
+ PERL_LIB=`$PERL -V:privlib|sed 's,^.*='"',,"|sed "s,';"'$',,`
+ if test -d "$PERL_LIB" ; then
+ AC_MSG_RESULT($PERL_LIB)
+ else
+ AC_MSG_RESULT(failed)
+ WITH_PERL=false
+ fi
+fi
+
+if test $WITH_PERL = true ; then
+ AC_MSG_CHECKING(perl archlib)
+ PERL_ARCHLIB=`$PERL -V:archlib|sed 's,^.*='"',,"|sed "s,';"'$',,`
+ if test -d "$PERL_ARCHLIB" ; then
+ AC_MSG_RESULT($PERL_ARCHLIB)
+ else
+ AC_MSG_RESULT(failed)
+ WITH_PERL=false
+ fi
+fi
+
+if test $WITH_PERL = true ; then
+ AC_MSG_CHECKING(perl sitearch)
+ PERL_SITEARCH=`$PERL -V:sitearch|sed 's,^.*='"',,"|sed "s,';"'$',,`
+ if test -d "$PERL_SITEARCH" ; then
+ AC_MSG_RESULT($PERL_SITEARCH)
+ else
+ AC_MSG_RESULT(failed)
+ WITH_PERL=false
+ fi
+fi
+
+if test $WITH_PERL = true ; then
+ AC_MSG_CHECKING(perl sitelib)
+ PERL_SITELIB=`$PERL -V:sitelib|sed 's,^.*='"',,"|sed "s,';"'$',,`
+ if test -d "$PERL_SITELIB" ; then
+ AC_MSG_RESULT($PERL_SITELIB)
+ else
+ AC_MSG_RESULT(failed)
+ WITH_PERL=false
+ fi
+fi
+
+AC_SUBST(PERL_LIB)
+AC_SUBST(PERL_ARCHLIB)
+AC_SUBST(PERL_SITEARCH)
+AC_SUBST(PERL_SITELIB)
+
AC_ARG_ENABLE(scripting,
[ --enable-scripting Enable the perl scripting interface ],
@@ -244,9 +329,13 @@
esac],[script=false])
-dnl this isn't actually used anywhere, but we provide it anyway
-AM_CONDITIONAL(SCRIPT, test x$script = xtrue)
+dnl At this moment, we only have a perl scripting interface
+if test $WITH_PERL = false ; then
+ script=false;
+fi
case "$script" in
"true" )
+
+
SCRIPT_CFLAGS="-DABI_OPT_PERL `perl -MExtUtils::Embed -e ccopts` -Ubool"
SCRIPT_LIBS="`perl -MExtUtils::Embed -e ldopts`"
@@ -264,4 +353,7 @@
;;
esac
+
+dnl this isn't actually used anywhere, but we provide it anyway
+AM_CONDITIONAL(SCRIPT, test x$script = xtrue)
if test "$PLATFORM" = unix -a "$gnome" = true ; then
Index: src/bindings/perl/GNUmakefile.am
===================================================================
RCS file: /cvsroot/abi/src/bindings/perl/GNUmakefile.am,v
retrieving revision 1.3
diff -u -2 -r1.3 GNUmakefile.am
--- src/bindings/perl/GNUmakefile.am 2001/10/05 09:44:13 1.3
+++ src/bindings/perl/GNUmakefile.am 2002/02/07 21:47:21
@@ -20,7 +20,8 @@
###################
-PERL_ARCHLIB = /usr/lib/perl5/5.6.0/i386-linux
-PERL_LIB = /usr/lib/perl5/5.6.0
-POD2MAN_EXE = /usr/bin/pod2man
+PERL_ARCHLIB = @PERL_ARCHLIB@
+PERL_LIB = @PERL_LIB@
+PERL_SITEARCH = @PERL_SITEARCH@
+POD2MAN_EXE = @POD2MAN@
PERM_RW = 644
###################
@@ -43,9 +44,9 @@
-e 'chmod(oct($(PERM_RW))), $$m{$$_} or warn "chmod $(PERM_RW)
$$m{$$_}: $$!\n";}' \
$(perldir)/AbiWord.pm $(perldir)/blib/man3/AbiWord.3pm
- @perl -Iblib/lib -I/usr/lib/perl5/5.6.0 -MExtUtils::Install -e
"install({@ARGV},'1',0,'0');" \
- read /usr/lib/perl5/site_perl/5.6.0/i386-linux/auto/AbiWord/.packlist \
- write /usr/lib/perl5/site_perl/5.6.0/i386-linux/auto/AbiWord/.packlist
\
- blib/lib /usr/lib/perl5/site_perl/5.6.0 \
- blib/arch /usr/lib/perl5/site_perl/5.6.0/i386-linux \
+ @perl -Iblib/lib -I$(PERL_LIB) -MExtUtils::Install -e
+"install({@ARGV},'1',0,'0');" \
+ read $(PERL_SITEARCH)/auto/AbiWord/.packlist \
+ write $(PERL_SITEARCH)/auto/AbiWord/.packlist \
+ blib/lib $(PERL_SITELIB) \
+ blib/arch $(PERL_SITEARCH) \
blib/bin /usr/bin \
blib/script /usr/bin \
@@ -56,7 +57,7 @@
-e 'print "\t$$ARGV[0].\n";' \
-e 'print "Please make sure the two installations are not
conflicting\n";' \
- /usr/lib/perl5/5.6.0/i386-linux/auto/AbiWord
- @perl -I/usr/lib/perl5/5.6.0/i386-linux -I/usr/lib/perl5/5.6.0
-MExtUtils::Command \
- -e mkpath /usr/lib/perl5/5.6.0/i386-linux
+ $(PERL_ARCHLIB)/auto/AbiWord
+ @perl -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command \
+ -e mkpath $(PERL_ARCHLIB)
@perl -e '$$\="\n\n";' -e 'print "=head2 ", scalar(localtime), ": C<", shift,
">", " L<", shift, ">";' \
-e 'print "=over 4";' \
@@ -68,4 +69,4 @@
VERSION "0.01" \
EXE_FILES "" \
- >> /usr/lib/perl5/5.6.0/i386-linux/perllocal.pod
- @echo Appending installation info to
/usr/lib/perl5/5.6.0/i386-linux/perllocal.pod
+ >> $(PERL_ARCHLIB)/perllocal.pod
+ @echo Appending installation info to $(PERL_ARCHLIB)/perllocal.pod