cvs: php4 /ext/recode/ Makefile.in config.m4 recode.c

[email protected] ("Sascha Schumann")
Newsgroups php.version4
Message-ID <cvssas959124638@cvsserver>
sas		Wed May 24 01:30:38 2000 EDT

  Modified files:
    /php4/ext/recode	Makefile.in config.m4 recode.c 
  Log:
  Make recode extension buildable as shared module.
  
  
Index: php4/ext/recode/Makefile.in
diff -u php4/ext/recode/Makefile.in:1.6 php4/ext/recode/Makefile.in:1.7
--- php4/ext/recode/Makefile.in:1.6	Tue May  2 00:38:32 2000
+++ php4/ext/recode/Makefile.in	Wed May 24 01:30:38 2000
@@ -1,5 +1,7 @@
 
 LTLIBRARY_NAME    = librecode.la
 LTLIBRARY_SOURCES = recode.c
+LTLIBRARY_SHARED_NAME = recode.la
+LTLIBRARY_SHARED_LIBADD = $(RECODE_SHARED_LIBADD)
 
 include $(top_srcdir)/build/dynlib.mk
Index: php4/ext/recode/config.m4
diff -u php4/ext/recode/config.m4:1.2 php4/ext/recode/config.m4:1.3
--- php4/ext/recode/config.m4:1.2	Sun Mar 26 21:47:25 2000
+++ php4/ext/recode/config.m4	Wed May 24 01:30:38 2000
@@ -1,16 +1,15 @@
-dnl $Id: config.m4,v 1.2 2000/03/26 19:47:25 sas Exp $
+dnl $Id: config.m4,v 1.3 2000/05/23 23:30:38 sas Exp $
 dnl config.m4 for extension recode
 dnl don't forget to call PHP_EXTENSION(recode)
 
 
-AC_MSG_CHECKING(for recode support)
-AC_ARG_WITH(recode,
+PHP_ARG_WITH(recode,for recode support,
 [  --with-recode[=DIR]     Include recode support. DIR is the recode install
-                          directory.],
-[
-	if test "$withval" != "no"; then
-		RECODE_LIST="$withval /usr /usr/local /opt"
+                          directory.])
 
+	if test "$PHP_RECODE" != "no"; then
+		RECODE_LIST="$PHP_RECODE /usr /usr/local /opt"
+
 		for i in $RECODE_LIST; do
 			if test -f $i/include/recode.h; then
 				RECODE_DIR=$i
@@ -51,15 +50,13 @@
 		fi
 
 		AC_ADD_INCLUDE($RECODE_DIR/$RECODE_INC)
-		AC_ADD_LIBRARY_DEFER_WITH_PATH(recode, $RECODE_DIR/$RECODE_LIB)
-
-		AC_MSG_RESULT(yes)
+		if test "$ext_shared" = "yes"; then
+			AC_ADD_LIBRARY_WITH_PATH(recode, $RECODE_DIR/$RECODE_LIB, RECODE_SHARED_LIBADD)
+			PHP_SUBST(RECODE_SHARED_LIBADD)
+		else
+			AC_ADD_LIBRARY_DEFER_WITH_PATH(recode, $RECODE_DIR/$RECODE_LIB)
+		fi
 
 		AC_DEFINE(HAVE_LIBRECODE, 1, [Whether we have librecode 3.5 or higher])
-		PHP_EXTENSION(recode)
-	else
-		AC_MSG_RESULT(no)
+		PHP_EXTENSION(recode,$ext_shared)
 	fi
-],[
-	AC_MSG_RESULT(no)
-])
Index: php4/ext/recode/recode.c
diff -u php4/ext/recode/recode.c:1.6 php4/ext/recode/recode.c:1.7
--- php4/ext/recode/recode.c:1.6	Thu May 18 17:34:33 2000
+++ php4/ext/recode/recode.c	Wed May 24 01:30:38 2000
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
  
-/* $Id: recode.c,v 1.6 2000/05/18 15:34:33 zeev Exp $ */
+/* $Id: recode.c,v 1.7 2000/05/23 23:30:38 sas Exp $ */
 
 /* {{{ includes & prototypes */
 
@@ -64,6 +64,10 @@
 extern void timeout(int sig);
 #endif
 
+#ifdef COMPILE_DL_RECODE
+ZEND_GET_MODULE(recode)
+#endif
+
 PHP_MINIT_FUNCTION(recode)
 {
 	ReSLS_FETCH();
@@ -92,7 +96,7 @@
 
 	php_info_print_table_start();
 	php_info_print_table_row(2, "Recode Support", "enabled");
-	php_info_print_table_row(2, "Revision", "$Revision: 1.6 $");
+	php_info_print_table_row(2, "Revision", "$Revision: 1.7 $");
 	php_info_print_table_end();
 
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.