mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Use libtool.
This commit is contained in:
parent
8ae3f4b027
commit
e67005e748
5 changed files with 19 additions and 48 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue