summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TSRM/Makefile.am4
-rw-r--r--TSRM/TSRM.h3
-rwxr-xr-xTSRM/buildconf9
-rw-r--r--TSRM/configure.in8
-rwxr-xr-xTSRM/tsrm_config.in43
5 files changed, 19 insertions, 48 deletions
diff --git a/TSRM/Makefile.am b/TSRM/Makefile.am
index 6bea4e8cc6..a779ca8552 100644
--- a/TSRM/Makefile.am
+++ b/TSRM/Makefile.am
@@ -1,4 +1,4 @@
## process this file with automake to produce Makefile.am
AUTOMAKE_OPTIONS=foreign
-lib_LIBRARIES=libtsrm.a
-libtsrm_a_SOURCES = TSRM.c
+noinst_LTLIBRARIES=libtsrm.la
+libtsrm_la_SOURCES = TSRM.c
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h
index 9f55a7683d..fef17fc873 100644
--- a/TSRM/TSRM.h
+++ b/TSRM/TSRM.h
@@ -59,6 +59,7 @@ typedef int ts_rsrc_id;
# define MUTEX_T PISync *
#endif
+typedef void (*ts_allocate_ctor)(void *);
#define THREAD_HASH_OF(thr,ts) thr%ts
@@ -71,7 +72,7 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu
TSRM_API void tsrm_shutdown();
/* allocates a new thread-safe-resource id */
-TSRM_API ts_rsrc_id ts_allocate_id(size_t size, void (*ctor)(void *resource), void (*dtor)(void *resource));
+TSRM_API ts_rsrc_id ts_allocate_id(size_t size, ts_allocate_ctor ctor, void (*dtor)(void *resource));
/* fetches the requested resource for the current thread */
TSRM_API void *ts_resource(ts_rsrc_id id);
diff --git a/TSRM/buildconf b/TSRM/buildconf
index deb6aedb79..fa9dd2097f 100755
--- a/TSRM/buildconf
+++ b/TSRM/buildconf
@@ -1,5 +1,14 @@
#!/bin/sh
+case "$1" in
+--copy)
+ automake_flags=--copy
+ shift
+;;
+esac
+
+libtoolize --force --automake $automake_flags
+
mv aclocal.m4 aclocal.m4.old 2>/dev/null
aclocal
if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
diff --git a/TSRM/configure.in b/TSRM/configure.in
index d81618eb4d..ded8166948 100644
--- a/TSRM/configure.in
+++ b/TSRM/configure.in
@@ -12,6 +12,11 @@ AM_PROG_CC_STDC
AC_PROG_CC_C_O
AC_PROG_RANLIB
+AM_PROG_LIBTOOL
+if test "$enable_debug" != "yes"; then
+ AM_SET_LIBTOOL_VARIABLE([--silent])
+fi
+
AC_CHECK_LIB(c_r, pthread_kill)
AC_CHECK_LIB(pthread, pthread_kill)
@@ -25,5 +30,4 @@ AC_DEFINE(PTHREADS)
AC_CHECK_HEADERS(stdarg.h)
-AC_OUTPUT(Makefile tsrm_config)
-AC_OUTPUT_COMMANDS([chmod +x tsrm_config])
+AC_OUTPUT(Makefile)
diff --git a/TSRM/tsrm_config.in b/TSRM/tsrm_config.in
deleted file mode 100755
index c80000c8da..0000000000
--- a/TSRM/tsrm_config.in
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/sh
-#
-# $Id$
-#
-# Written by Sascha Schumann <sascha@schumann.cx>
-
-
-# taken from autoconf
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-flags_libs="@LIBS@"
-flags_ldflags="@LDFLAGS@"
-flags_cflags="@CPPFLAGS@ @CFLAGS@"
-
-case "$1" in
---ldflags)
- echo $ac_n "$flags_ldflags$ac_c"
-;;
---cflags)
- echo $ac_n "$flags_cflags$ac_c"
-;;
---libs)
- echo $ac_n "$flags_libs$ac_c"
-;;
-*)
- echo "$0 [--libs|--cflags|--ldflags]"
- exit 1
-;;
-esac
-
-exit 0