dnl
dnl This file contains local autoconf functions.
+dnl
+dnl PHP_SET_SYM_FILE(path)
+dnl
+dnl set the path of the file which contains the symbol export list
+dnl
+AC_DEFUN(PHP_SET_SYM_FILE,
+[
+ PHP_SYM_FILE="$1"
+])
+
dnl
dnl PHP_BUILD_SHARED
dnl
AC_SUBST(abs_srcdir)
AC_SUBST(abs_builddir)
-RESULT=no
-AC_MSG_CHECKING(whether to enable versioning)
-AC_ARG_ENABLE(versioning,
-[ --enable-versioning Take advantage of versioning and scoping.
- See INSTALL for more information],
-[
- if test "$enableval" = "yes" ; then
- EXTRA_LDFLAGS="-export-symbols \$(srcdir)/php.sym"
- RESULT="yes"
- fi
-])
-AC_MSG_RESULT($RESULT)
-
AC_MSG_CHECKING(whether to use a configuration file)
AC_ARG_WITH(config-file-path,
[ --with-config-file-path=PATH
PHP_OUTPUT(sapi/$PHP_SAPI/Makefile)
+RESULT=no
+AC_MSG_CHECKING(whether to enable versioning)
+AC_ARG_ENABLE(versioning,
+[ --enable-versioning Export only required symbols.
+ See INSTALL for more information],
+[
+ test -z "$PHP_SYM_FILE" && PHP_SYM_FILE="$abs_srcdir/sapi/$PHP_SAPI/php.sym"
+ if test "$enableval" = "yes" && test -f "$PHP_SYM_FILE"; then
+ EXTRA_LDFLAGS="-export-symbols $PHP_SYM_FILE"
+ RESULT="yes"
+ fi
+])
+AC_MSG_RESULT($RESULT)
+
divert(4)
enable_shared=yes