OSSP CVS Repository

ossp - Check-in [4815]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4815
Date: 2004-Nov-03 18:07:57 (local)
2004-Nov-03 17:07:57 (UTC)
User:rse
Branch:
Comment: Add --with-perl configure option for optionally enabling the Perl language bindings.
Tickets:
Inspections:
Files:
ossp-pkg/uuid/ChangeLog      1.58 -> 1.59     5 inserted, 1 deleted
ossp-pkg/uuid/Makefile.in      1.21 -> 1.22     22 inserted, 1 deleted
ossp-pkg/uuid/uuid.ac      1.11 -> 1.12     23 inserted, 2 deleted

ossp-pkg/uuid/ChangeLog 1.58 -> 1.59

--- ChangeLog    2004/11/03 14:52:08     1.58
+++ ChangeLog    2004/11/03 17:07:57     1.59
@@ -13,7 +13,11 @@
 
   Changes between 1.0.4 and 1.1.0 (16-Oct-2004 to xx-Nov-2004)
 
-   o Add Perl language binding providing both a C-style and OO-style API.
+   o Add --with-perl configure option for optionally enabling
+     the Perl language bindings.
+     [Ralf S. Engelschall]
+
+   o Add Perl language bindings providing both a C-style and OO-style API.
      [Ralf S. Engelschall]
 
   Changes between 1.0.3 and 1.0.4 (15-Oct-2004 to 16-Oct-2004)


ossp-pkg/uuid/Makefile.in 1.21 -> 1.22

--- Makefile.in  2004/10/16 18:20:18     1.21
+++ Makefile.in  2004/11/03 17:07:57     1.22
@@ -53,6 +53,7 @@
 LIBTOOL     = ./libtool
 TRUE        = true
 POD2MAN     = pod2man
+PERL        = @PERL@
 
 LIB_NAME    = libuuid.la
 LIB_OBJS    = uuid.lo uuid_md5.lo uuid_prng.lo uuid_mac.lo uuid_ui64.lo uuid_str.lo
@@ -65,9 +66,13 @@
 
 MAN_NAME    = uuid.3 uuid.1
 
-TARGETS     = $(LIB_NAME) @DCE_NAME@ $(PRG_NAME)
+PERL_NAME   = perl/blib/lib/OSSP/uuid.pm
+PERL_OBJS   = perl/uuid.pm
+
+TARGETS     = $(LIB_NAME) @DCE_NAME@ $(PRG_NAME) @PERL_NAME@
 
 WITH_DCE    = @WITH_DCE@
+WITH_PERL   = @WITH_PERL@
 
 .SUFFIXES:
 .SUFFIXES: .c .o .lo
@@ -91,6 +96,9 @@
 $(PRG_NAME): $(PRG_OBJS) $(LIB_NAME)
         @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(PRG_NAME) $(PRG_OBJS) $(LIB_NAME) $(LIBS)
 
+$(PERL_NAME): $(PERL_OBJS) $(LIB_NAME)
+        @cd perl && $(PERL) Makefile.PL PREFIX=$(prefix) && $(MAKE) $(MFLAGS) all
+
 uuid.lo: uuid.c config.h uuid.h uuid_md5.h uuid_prng.h uuid_mac.h uuid_ui64.h uuid_str.h uuid_bm.h uuid_ac.h
 uuid_mac.lo: uuid_mac.c config.h uuid_mac.h
 uuid_md5.lo: uuid_md5.c uuid_md5.h
@@ -146,6 +154,10 @@
         $(LIBTOOL) --mode=execute ./$(PRG_NAME) -d `$(LIBTOOL) --mode=execute ./$(PRG_NAME) -v3 ns:URL http://www.ossp.org/`
         @echo "==== UUID version 3 generation and decoding"; \
         $(LIBTOOL) --mode=execute ./$(PRG_NAME) -d `$(LIBTOOL) --mode=execute ./$(PRG_NAME) -v4`
+        -@if [ ".$(WITH_PERL)" = .yes ]; then \
+            echo "==== Perl bindings to C API"; \
+            (cd perl && $(MAKE) $(MFLAGS) test); \
+        fi
 
 install:
         $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix)
@@ -168,6 +180,9 @@
         fi
         @$(LIBTOOL) --mode=install $(SHTOOL) install -c -s -m 755 uuid $(DESTDIR)$(bindir)/
         $(SHTOOL) install -c -m 644 $(srcdir)/uuid.1 $(DESTDIR)$(mandir)/man1/
+        -@if [ ".$(WITH_PERL)" = .yes ]; then \
+            (cd perl && $(MAKE) $(MFLAGS) install); \
+        fi
 
 uninstall:
         -$(RM) $(DESTDIR)$(mandir)/man1/uuid.1
@@ -201,11 +216,17 @@
         -$(RM) $(PRG_NAME) $(PRG_OBJS)
         -$(RM) -r .libs >/dev/null 2>&1 || $(TRUE)
         -$(RM) *.o *.lo
+        -@if [ ".$(WITH_PERL)" = .yes ]; then \
+            (cd perl && $(MAKE) $(MFLAGS) clean || true); \
+        fi
 
 distclean: clean
         -$(RM) config.log config.status config.cache
         -$(RM) Makefile config.h uuid-config uuid.h
         -$(RM) libtool
+        -@if [ ".$(WITH_PERL)" = .yes ]; then \
+            (cd perl && $(MAKE) $(MFLAGS) distclean || true); \
+        fi
 
 realclean: distclean
         -$(RM) uuid.3 uuid.1


ossp-pkg/uuid/uuid.ac 1.11 -> 1.12

--- uuid.ac      2004/02/13 21:01:41     1.11
+++ uuid.ac      2004/11/03 17:07:57     1.12
@@ -70,10 +70,11 @@
     AC_CHECK_SIZEOF(long long, 8)
     AC_CHECK_SIZEOF(unsigned long long, 8)
 
-    dnl #   options
-    AC_ARG_WITH(dce,
+    dnl #   configure option --with-dce
+    AC_ARG_WITH([dce],
         AC_HELP_STRING([--with-dce], [build DCE 1.1 backward compatibility API]),
         [ac_cv_with_dce=$withval], [ac_cv_with_dce=no])
+    AC_CACHE_CHECK([whether to build DCE 1.1 backward compatibility API], [ac_cv_with_dce], [ac_cv_with_dce=no])
     if test ".$ac_cv_with_dce" = ".yes"; then
         AC_DEFINE(WITH_DCE, 1, [whether to build DCE 1.1 backward compatibility API])
         WITH_DCE='yes'
@@ -84,5 +85,25 @@
     fi
     AC_SUBST(WITH_DCE)
     AC_SUBST(DCE_NAME)
+
+    dnl #   configure option --with-perl
+    AC_ARG_WITH([perl],
+        AS_HELP_STRING([--with-perl], [build Perl bindings to C API]),
+        [ac_cv_with_perl=$withval], [ac_cv_with_perl=no])
+    AC_CACHE_CHECK([whether to build Perl bindings to C API], [ac_cv_with_perl], [ac_cv_with_perl=no])
+    if test ".$ac_cv_with_perl" = ".yes"; then
+        AC_DEFINE(WITH_PERL, 1, [whether to build Perl bindings to C API])
+        WITH_PERL='yes'
+        PERL_NAME='$(PERL_NAME)'
+    else
+        WITH_PERL='no'
+        PERL_NAME=''
+    fi
+    AC_SUBST(WITH_PERL)
+    AC_SUBST(PERL_NAME)
+    AC_PATH_PROG(PERL, perl, NA)
+    if test ".$PERL" = .NA; then
+        AC_ERROR([required Perl interpreter not found in \$PATH])
+    fi
 ])
 

CVSTrac 2.0.1