Fixed the libtoolfix to use command line arguments.
authorPekka Riikonen <priikone@silcnet.org>
Thu, 5 Dec 2002 17:34:29 +0000 (17:34 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 5 Dec 2002 17:34:29 +0000 (17:34 +0000)
CHANGES
lib/Makefile.am.pre
lib/silccrypt/Makefile.am
lib/silcsim/Makefile.am
libtoolfix
prepare

diff --git a/CHANGES b/CHANGES
index 4386c87e5691eecaaec91cb7f93722518c9a0a05..65f6be31f1dbd3d2295ea5d9f5d7dfb9000247cf 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,10 @@ Thu Dec  5 16:35:23 EET 2002  Pekka Riikonen <priikone@silcnet.org>
          to ignore signatures in messages.  Affected files are
          irssi/src/silc/core/client_ops.c, silc-core.c.
 
+       * Fixed the libtoolfix to use command line options instead of
+         environment variables.  They didn't work as expected.  Now,
+         the libtool is fully run-time configurable.
+
 Wed Dec  4 21:08:52 CET 2002  Jochen Eisinger <c0ffee@penguin-breeder.org>
 
        * Verify signature payload for signed messages. Affected files
index cc4dd748a6163a84c2898020edb32a31478f6ce4..0c2e8256b1f8538d36a59ae03094c673d0f6e8b2 100644 (file)
@@ -77,12 +77,10 @@ install-exec-hook:
 else
 install-exec-hook:
        -mkdir -p $(libdir)
-       -@if test '!' -f $(top_srcdir)/lib/.libs/libsilc.a ; then \
-          $(LIBTOOL) $(INSTALL) libsilc.la $(libdir)/ \
-       fi
-       -@if test '!' -f $(top_srcdir)/lib/.libs/libsilcclient.a ; then \
-          $(LIBTOOL) $(INSTALL) libsilcclient.la $(libdir)/ \
-       fi
+       -$(LIBTOOL) $(INSTALL) libsilc.la $(libdir)/
+       -$(LIBTOOL) $(INSTALL) libsilcclient.la $(libdir)/
+       -rm -rf $(libdir)/libsilc.a
+       -rm -rf $(libdir)/libsilcclient.a
 endif
 
 if SILC_DIST_WIN32DLL
index e2522d889f575d345642559f6c8b1e49f71d6c55..d158c3ae20fc8d072b2b1ba71b7f84a688c30aeb 100644 (file)
@@ -20,9 +20,6 @@ AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
 
 noinst_LTLIBRARIES = libsilccrypt.la
 
-# Compile silccrypt always as shared library since silcsim will need it.
-LIBTOOL_ENABLE_SHARED=yes
-
 libsilccrypt_la_SOURCES = \
        none.c \
        rc5.c \
@@ -41,6 +38,9 @@ libsilccrypt_la_SOURCES = \
        silcpkcs.c \
        pkcs1.c
 
+# Tell libtool to compile silccrypt as shared since silcsim will need it.
+CFLAGS = --libtool-enable-shared
+
 if SILC_DIST_TOOLKIT
 include_HEADERS =      \
        aes.h           \
@@ -64,6 +64,6 @@ include_HEADERS =     \
        twofish.h
 endif
 
-EXTRA_DIST = *.h
+EXTRA_DIST = *.h tests
 
 include $(top_srcdir)/Makefile.defines.in
index 4ff1af45e774c8209c66220cc2ab7fbfa846b2ed..6fed677471c96eaf1f454b9795acbff422d574b0 100644 (file)
@@ -52,14 +52,10 @@ if SILC_SIM
 all: $(SIM_CIPHER_OBJS) $(SIM_HASH_OBJS)
 endif
 
-# Libtool to compile always SIM as shared library
-LIBTOOL_ENABLE_SHARED=yes
-LIBTOOL_ENABLE_STATIC=no
-
 $(SIM_CIPHER_OBJS):
        @if test '!' -f lib$*.la ; then \
          $(LIBTOOL) --mode=link $(CCLD) -rpath $(silc_modulesdir) \
-               ../silccrypt/$*.lo -o lib$*.la; \
+               ../silccrypt/$*.lo -o lib$*.la --libtool-enable-shared; \
          cd $(srcdir) && $(LN_S) -f $(srcdir)/.libs/lib$*.so \
                $(srcdir)/$*.sim.so; \
        fi
@@ -67,7 +63,7 @@ $(SIM_CIPHER_OBJS):
 $(SIM_HASH_OBJS):
        @if test '!' -f lib$*.la ; then \
          $(LIBTOOL) --mode=link $(CCLD) -rpath $(silc_modulesdir) \
-               ../silccrypt/$*.lo -o lib$*.la; \
+               ../silccrypt/$*.lo -o lib$*.la --libtool-enable-shared; \
          cd $(srcdir) && $(LN_S) -f $(srcdir)/.libs/lib$*.so \
                $(srcdir)/$*.sim.so; \
        fi
index e7955faad478fa9ccb5ee47e9810ec577163df3e..28ec812e4b069b16707f270fc58653e486395c09 100755 (executable)
@@ -4,16 +4,16 @@
 #
 # This script fixes the fundamental problem of libtool: it is not 
 # configurable in run-time.  This changes the libtool so that it becomes
-# more generic and configurable in run-time.  It is possible to specify
-# how the libtool should behave by environment variables.
+# more generic and configurable in run-time.
 #
-# Environment variables:
+# New command line options to libtool:
 #
-# LIBTOOL_ENABLE_SHARED
-# LIBTOOL_ENABLE_STATIC
+# --libtool-enable-shared      Enable shared library compilation
+# --libtool-enable-static      Enable static library compilation
+# --libtool-disable-shared     Disable shared library compilation
+# --libtool-disable-static     Disable static library compilation
 #
-# Set either to "yes" or "no" value.  "no" is equivalent to being disabled.
-# If environment variables are not given then the default settings apply.
+# If options are omitted the default libtool configuration will apply.
 #
 
 # Sanity checks
@@ -26,20 +26,37 @@ fi
 sed '/^# ltmain\.sh/q' ./libtool >./libtool.tmp
 
 # Put our wrapper to the new libtool.  This allows the run-time
-# configuration of the libtool.  This could include a lot of other
-# things like command line arguments too.
+# configuration of the libtool.
+ltmain=`pwd`/ltmain.sh
 cat << EOF >> ./libtool.tmp
-if test "\$LIBTOOL_ENABLE_SHARED" != ""; then
-  build_libtool_libs=\$LIBTOOL_ENABLE_SHARED
-fi
-if test "\$LIBTOOL_ENABLE_STATIC" != ""; then
-  build_old_libs=\$LIBTOOL_ENABLE_STATIC
+args=\`echo \$*\`
+cargs=\`echo \$* | sed -e '/--libtool-enable-shared/s///' -e '/--libtool-enable-static/s///' -e '/--libtool-disable-shared/s///' -e '/--libtool-disable-static/s///'\`
+for i in \$args
+do
+  if test "\$i" == "--libtool-enable-shared"; then
+    build_libtool_libs=yes
+    fast_install=yes
+    continue
+  fi
+  if test "\$i" == "--libtool-disable-shared"; then
+    build_libtool_libs=no
+    continue
+  fi
+  if test "\$i" == "--libtool-enable-static"; then
+    build_old_libs=yes
+    continue
+  fi
+  if test "\$i" == "--libtool-disable-static"; then
+    build_old_libs=no
+    continue
+  fi
+done
+if test "\$cargs" = ""; then
+  cargs="--silent"
 fi
+. $ltmain \$cargs
 EOF
 
-# Do a trick with the ltmain.sh to make these settings valid
-ltmain=`pwd`/ltmain.sh
-echo ". $ltmain" >> ./libtool.tmp
 mv -f ./libtool.tmp ./libtool
 chmod +x ./libtool
 
diff --git a/prepare b/prepare
index 3114ca1142ba1ec5a54100446a6359b693563eef..e0ba0efe7f5abf09487201abd5b2dd366aacb94e 100755 (executable)
--- a/prepare
+++ b/prepare
@@ -37,7 +37,7 @@
 # SILC Distribution versions. Set here or give the version on the command
 # line as argument.
 #
-SILC_VERSION=0.9.6                     # Base version
+SILC_VERSION=0.9.7                     # Base version
 
 #############################################################################