OSSP CVS Repository

ossp - Difference in ossp-pkg/js/configure.ac versions 1.4 and 1.5
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/js/configure.ac 1.4 -> 1.5

--- configure.ac 2006/07/22 15:02:07     1.4
+++ configure.ac 2006/07/22 15:40:04     1.5
@@ -48,15 +48,19 @@
 CPPFLAGS="$CPPFLAGS -DOSSP"
 
 CLI_CPPFLAGS=""
+CLI_CFLAGS=""
 CLI_LDFLAGS=""
 CLI_LIBS=""
+CLI_OBJS=""
+
+dnl #   configure option --with-editline[=path]
 AC_ARG_WITH([editline],
     AC_HELP_STRING([--with-editline], [build command line interface with line editing support via editline, libedit or GNU readline]),
     [ac_cv_with_editline=$withval], [ac_cv_with_editline=no])
 AC_CACHE_CHECK([whether to build command line interface with line editing support],
     [ac_cv_with_editline], [ac_cv_with_editline=no])
 if test ".$ac_cv_with_editline" != ".no"; then
-    CLI_CPPFLAGS="-DEDITLINE"
+    CLI_CPPFLAGS="$CLI_CPPFLAGS -DEDITLINE"
     case "$ac_cv_with_editline" in
         /* ) CLI_LDFLAGS="-L$ac_cv_with_editline" ;;
     esac
@@ -72,15 +76,43 @@
     LDFLAGS="$OLD_LDFLAGS"
     LIBS="$OLD_LIBS"
 fi
+
+dnl #   configure option --with-perl
+AC_ARG_WITH([perl],
+        AS_HELP_STRING([--with-perl], [build Perl-to-JS and JS-to-Perl bindings]),
+        [ac_cv_with_perl=$withval], [ac_cv_with_perl=no])
+AC_CACHE_CHECK([whether to build Perl-to-JS and JS-to-Perl bindings], [ac_cv_with_perl], [ac_cv_with_perl=no])
+if test ".$ac_cv_with_perl" != ".no"; then
+        WITH_PERL="yes"
+        CLI_OBJS="$CLI_OBJS src/perlconnect/jsperl.o"
+        CLI_CPPFLAGS="$CLI_CPPFLAGS -DPERLCONNECT"
+else
+        WITH_PERL="no"
+fi
+AC_SUBST(WITH_PERL)
+case "$ac_cv_with_perl" in
+    /* ) PERL="$ac_cv_with_perl" ;;
+esac
+AC_PATH_PROG(PERL, perl, NA)
+if test ".$ac_cv_with_perl" = ".yes" -a ".$PERL" = ".NA"; then
+        AC_ERROR([required Perl interpreter not found in \$PATH])
+fi
+if test ".$ac_cv_with_perl" != ".no"; then
+    CLI_CFLAGS="$CLI_CFLAGS `$PERL -MExtUtils::Embed -e ccopts`"
+    CLI_LIBS="$CLI_LIBS `$PERL -MExtUtils::Embed -e ldopts`"
+fi
+
+AC_SUBST(CLI_CFLAGS)
 AC_SUBST(CLI_CPPFLAGS)
 AC_SUBST(CLI_LDFLAGS)
 AC_SUBST(CLI_LIBS)
+AC_SUBST(CLI_OBJS)
 
 with_tags=""
 sinclude(libtool.m4)
 AC_PROG_LIBTOOL
 
 AC_CONFIG_HEADERS(config.h)
-AC_CONFIG_FILES([Makefile js.pc])
+AC_CONFIG_FILES([Makefile js.pc src/perlconnect/Makefile.PL])
 AC_OUTPUT
 

CVSTrac 2.0.1