decoded and encoded public key. Affected files are
lib/silccore/silcmessage.[ch].
+ * Added libtoolfix script that makes the libtool more generic
+ and configurable in run-time. Now we can specify in run-time
+ if what kind of libraries we want to create, regardless of
+ configuration. SIMs are now creates even if --disable-shared
+ was explicitly given.
+
Tue Dec 3 23:26:55 EET 2002 Pekka Riikonen <priikone@silcnet.org>
* Fixed founder key sending in CMODE command in client.
TODO/bugs In SILC Libraries
===========================
- o libtool hack to compile SIM even when disable-shared
-
o Test cases for all cryptographic primitive in lib/silccrypt/
o Test cases for all payload encoding and decoding routins in lib/silccore/
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) \
--- /dev/null
+#!/bin/sh
+#
+# No Copyright 2002 Pekka Riikonen <priikone@silcnet.org>
+#
+# 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.
+#
+# Environment variables:
+#
+# LIBTOOL_ENABLE_SHARED
+# LIBTOOL_ENABLE_STATIC
+#
+# Set either to "yes" or "no" value. "no" is equivalent to being disabled.
+# If environment variables are not given then the default settings apply.
+#
+
+# Sanity checks
+if test '!' -f ./libtool; then
+ echo "./libtool does not exist"
+ exit 0
+fi
+
+# Take configuration from the ./libtool
+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.
+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
+fi
+EOF
+
+# Do a trick with the ltmain.sh to make these settings valid
+ltmain=`pwd`/ltmain.sh
+echo ". $ltmain" >> ./libtool.tmp
+mv ./libtool ./libtool.orig
+mv ./libtool.tmp ./libtool
+chmod +x ./libtool
+
+exit 1