## 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
# define MUTEX_T PISync *
#endif
+typedef void (*ts_allocate_ctor)(void *);
#define THREAD_HASH_OF(thr,ts) thr%ts
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);
#!/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
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)
AC_CHECK_HEADERS(stdarg.h)
-AC_OUTPUT(Makefile tsrm_config)
-AC_OUTPUT_COMMANDS([chmod +x tsrm_config])
+AC_OUTPUT(Makefile)
+++ /dev/null
-#! /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