summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--README3
-rw-r--r--acconfig.h1
-rw-r--r--acinclude.m4217
-rw-r--r--cipher/ChangeLog4
-rw-r--r--cipher/dynload.c2
-rw-r--r--configure.in7
-rw-r--r--mpi/ChangeLog5
-rw-r--r--mpi/config.links19
9 files changed, 241 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 5b58729f..c71ee2ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Mar 8 20:47:17 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * configure.in (DLSYM_NEEDS_UNDERSCORE): Replaced.
+ * acinclude.in (AM_SYS_SYMBOL_UNDERSCORE): New.
+
+ * VERSION: Now 0.9.4
+
Sun Feb 28 19:11:00 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
* configure.in (dld): Test disabled.
diff --git a/README b/README
index 845c15be..04d4782f 100644
--- a/README
+++ b/README
@@ -1,3 +1,6 @@
+Please note that this is only a bug fix release and some things
+do not yet work - see TODO for parts which are problematic
+
-----BEGIN PGP SIGNED MESSAGE-----
GnuPG - The GNU Privacy Guard
diff --git a/acconfig.h b/acconfig.h
index fe2ac2fc..e3b4f29e 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -74,7 +74,6 @@
#undef USE_DYNAMIC_LINKING
#undef HAVE_DL_DLOPEN
#undef HAVE_DLD_DLD_LINK
-#undef DLSYM_NEEDS_UNDERSCORE
#undef USE_SHM_COPROCESSING
diff --git a/acinclude.m4 b/acinclude.m4
index 2349da62..2d0b69b6 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -342,5 +342,222 @@ define(GNUPG_CHECK_MLOCK,
fi
])
+#####################################################################
+# AM_SYS_SYMBOL_UNDERSCORE, AM_SYS_NM_PARSE:
+# This has been taken from glib 1.2.0 acinclude.m4 which states that
+# it is copyrighted by the FSF
+################################################################### ##
+dnl AM_SYS_SYMBOL_UNDERSCORE - does the compiler prefix global symbols
+dnl with an underscore?
+AC_DEFUN(AM_SYS_SYMBOL_UNDERSCORE,
+[AC_REQUIRE([AM_PROG_NM])dnl
+AC_REQUIRE([AM_SYS_NM_PARSE])dnl
+AC_MSG_CHECKING([for _ prefix in compiled symbols])
+AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
+[ac_cv_sys_symbol_underscore=no
+cat > conftest.$ac_ext <<EOF
+void nm_test_func(){}
+int main(){nm_test_func;return 0;}
+EOF
+if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ ac_nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
+ # See whether the symbols have a leading underscore.
+ if egrep '^_nm_test_func' "$ac_nlist" >/dev/null; then
+ ac_cv_sys_symbol_underscore=yes
+ else
+ if egrep '^nm_test_func ' "$ac_nlist" >/dev/null; then
+ :
+ else
+ echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
+ fi
+ fi
+ else
+ echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
+ fi
+else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.c >&AC_FD_CC
+fi
+rm -rf conftest*
+])
+AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
+if test x$ac_cv_sys_symbol_underscore = xyes; then
+ AC_DEFINE(WITH_SYMBOL_UNDERSCORE,1,
+ [define if compiled symbols have a leading underscore])
+fi
+])
+
+
+dnl AM_SYS_NM_PARSE - Check for command to grab the raw symbol name followed
+dnl by C symbol name from nm.
+AC_DEFUN(AM_SYS_NM_PARSE,
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AM_PROG_NM])dnl
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output])
+AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
+[# These are sane defaults that work on at least a few old systems.
+# {They come from Ultrix. What could be older than Ultrix?!! ;)}
+
+changequote(,)dnl
+# Character class describing NM global symbol codes.
+ac_symcode='[BCDEGRSTU]'
+
+# Regexp to match symbols that can be accessed directly from C.
+ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+ac_symxfrm='\1 \1'
+
+# Define system-specific variables.
+case "$host_os" in
+aix*)
+ ac_symcode='[BCDTU]'
+ ;;
+sunos* | cygwin32* | mingw32*)
+ ac_sympat='_\([_A-Za-z][_A-Za-z0-9]*\)'
+ ac_symxfrm='_\1 \1'
+ ;;
+irix*)
+ # Cannot use undefined symbols on IRIX because inlined functions mess us up.
+ ac_symcode='[BCDEGRST]'
+ ;;
+solaris*)
+ ac_symcode='[BDTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
+ ac_symcode='[ABCDGISTUW]'
+fi
+
+case "$host_os" in
+cygwin32* | mingw32*)
+ # We do not want undefined symbols on cygwin32. The user must
+ # arrange to define them via -l arguments.
+ ac_symcode='[ABCDGISTW]'
+ ;;
+esac
+changequote([,])dnl
+
+# Write the raw and C identifiers.
+ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* $ac_symcode $ac_sympat$/$ac_symxfrm/p'"
+
+# Check to see that the pipe works correctly.
+ac_pipe_works=no
+cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func;return 0;}
+EOF
+if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ ac_nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
+
+ # Try sorting and uniquifying the output.
+ if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
+ mv -f "$ac_nlist"T "$ac_nlist"
+ ac_wcout=`wc "$ac_nlist" 2>/dev/null`
+changequote(,)dnl
+ ac_count=`echo "X$ac_wcout" | sed -e 's,^X,,' -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
+changequote([,])dnl
+ (test "$ac_count" -ge 0) 2>/dev/null || ac_count=-1
+ else
+ rm -f "$ac_nlist"T
+ ac_count=-1
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
+ if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
+ cat <<EOF > conftest.c
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+ # Now generate the symbol file.
+ sed 's/^.* \(.*\)$/extern char \1;/' < "$ac_nlist" >> conftest.c
+
+ cat <<EOF >> conftest.c
+#if defined (__STDC__) && __STDC__
+# define __ptr_t void *
+#else
+# define __ptr_t char *
+#endif
+
+/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
+int dld_preloaded_symbol_count = $ac_count;
+
+/* The mapping between symbol names and symbols. */
+struct {
+ char *name;
+ __ptr_t address;
+}
+changequote(,)dnl
+dld_preloaded_symbols[] =
+changequote([,])dnl
+{
+EOF
+ sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
+ cat <<\EOF >> conftest.c
+ {0, (__ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftestm.$ac_objext
+ ac_save_LIBS="$LIBS"
+ ac_save_CFLAGS="$CFLAGS"
+ LIBS="conftestm.$ac_objext"
+ CFLAGS="$CFLAGS$no_builtin_flag"
+ if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ ac_pipe_works=yes
+ else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.c >&AC_FD_CC
+ fi
+ LIBS="$ac_save_LIBS"
+ CFLAGS="$ac_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
+ fi
+ else
+ echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
+ fi
+ else
+ echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
+ fi
+else
+ echo "$progname: failed program was:" >&AC_FD_CC
+ cat conftest.c >&AC_FD_CC
+fi
+rm -rf conftest*
+
+# Do not use the global_symbol_pipe unless it works.
+test "$ac_pipe_works" = yes || ac_cv_sys_global_symbol_pipe=
+])
+
+ac_result=yes
+if test -z "$ac_cv_sys_global_symbol_pipe"; then
+ ac_result=no
+fi
+AC_MSG_RESULT($ac_result)
+])
+dnl end of AM_SYS_NM_PARSE
+
dnl *-*wedit:notab*-* Please keep this as the last line.
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index bc9aa54e..a9a720f2 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,7 @@
+Mon Mar 8 20:47:17 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * dynload.c (DLSYM_NEEDS_UNDERSCORE): Renamed.
+
Fri Feb 26 17:55:41 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
* md.c: Nearly a total rewrote.
diff --git a/cipher/dynload.c b/cipher/dynload.c
index 75dcb396..b4ed7717 100644
--- a/cipher/dynload.c
+++ b/cipher/dynload.c
@@ -32,7 +32,7 @@
#include "cipher.h"
#include "dynload.h"
-#ifdef DLSYM_NEEDS_UNDERSCORE
+#ifdef WITH_SYMBOL_UNDERSCORE
#define SYMBOL_VERSION "_gnupgext_version"
#define SYMBOL_ENUM "_gnupgext_enum_func"
#else
diff --git a/configure.in b/configure.in
index 84fcbdb3..dbc1c59d 100644
--- a/configure.in
+++ b/configure.in
@@ -171,7 +171,7 @@ case "${target}" in
esac
AC_SUBST(MPI_OPT_FLAGS)
-
+AM_SYS_SYMBOL_UNDERSCORE
GNUPG_CHECK_PIC
GNUPG_CHECK_RDYNAMIC
if test "$NO_PIC" = yes; then
@@ -241,9 +241,6 @@ if test "$try_dynload" = yes ; then
AC_DEFINE(USE_DYNAMIC_LINKING)
AC_DEFINE(HAVE_DL_DLOPEN)
DYNLINK_LDFLAGS="$CFLAGS_RDYNAMIC"
- dnl fixme: this is probably false but it should
- dnl work for freebsd
- AC_DEFINE(DLSYM_NEEDS_UNDERSCORE)
use_gnupg_extensions=yes
dnl else
dnl
@@ -429,12 +426,10 @@ echo '}' >>cipher/construct.c
dnl
dnl Figure how to link the cipher modules
dnl
-dnl (form now these are only dynamic)
AC_SUBST(STATIC_CIPHER_OBJS)
AC_SUBST(DYNAMIC_CIPHER_MODS)
-
dnl setup assembler stuff
AC_MSG_CHECKING(for mpi assembler functions)
if test -f $srcdir/mpi/config.links ; then
diff --git a/mpi/ChangeLog b/mpi/ChangeLog
index 78bc0dd6..71fedb1a 100644
--- a/mpi/ChangeLog
+++ b/mpi/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar 8 20:47:17 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * config.links: Take advantage of the with_symbol_underscore macro.
+ Add support for freebsd 4.
+
Wed Feb 24 11:07:27 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
* mips3/mpih-sub1.S: Removed left over junk in last line. (Should I
diff --git a/mpi/config.links b/mpi/config.links
index 63255a12..4caf2b8d 100644
--- a/mpi/config.links
+++ b/mpi/config.links
@@ -12,12 +12,12 @@ echo '/* created by config.links - do not edit */' >./mpi/asm-syntax.h
if test "$try_asm_modules" = "yes" ; then
case "${target}" in
- i[34]86*-*-freebsd*-elf | i[34]86*-*-freebsd3*)
+ i[34]86*-*-freebsd*-elf | i[34]86*-*-freebsd[34]*)
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
path="i386"
;;
- i[56]86*-*-freebsd*-elf | i[56]86*-*-freebsd3*)
+ i[56]86*-*-freebsd*-elf | i[56]86*-*-freebsd[34]*)
echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
path="i586 i386"
@@ -168,22 +168,9 @@ else
fi
-case "${target}" in
- *-*-linuxaout* | *-*-linuxoldld* | *-*-linux-gnuoldld*)
- needs_underscore="y"
- ;;
- *-*-linux* | *-sysv* | *-solaris* | *-gnu* | *-freebsd*-elf)
- needs_underscore="n"
- ;;
- *)
- needs_underscore="y"
- ;;
-esac
-
-
# Make sysdep.h
echo '/* created by config.links - do not edit */' >./mpi/sysdep.h
-if test "$needs_underscore" = "y" ; then
+if test x$ac_cv_sys_symbol_underscore = xyes; then
cat <<EOF >>./mpi/sysdep.h
#if __STDC__
#define C_SYMBOL_NAME(name) _##name