Merge pull request #59 from gmp216/pull

Fix OS X build
This commit is contained in:
Michael Adam 2017-01-04 16:21:27 +01:00 committed by GitHub
commit 1e93411810
3 changed files with 30 additions and 8 deletions

View File

@ -219,7 +219,12 @@ if test x"$debug_enabled" != x"yes" ; then
CFLAGS="-DNDEBUG $CFLAGS" CFLAGS="-DNDEBUG $CFLAGS"
fi fi
AS_ECHO_N(["checking to see if linker understands -z,defs... "])
LDFLAGS_OLD="-Wl $LDFLAGS"
LDFLAGS="-Wl,-z,defs $LDFLAGS" LDFLAGS="-Wl,-z,defs $LDFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
AS_ECHO("yes"),
AS_ECHO("no"); LDFLAGS="$LDFLAGS_OLD")
dnl dnl
dnl Make sure we can actually handle the "--with-*" and "--enable-*" stuff. dnl Make sure we can actually handle the "--with-*" and "--enable-*" stuff.
@ -240,8 +245,6 @@ AC_SUBST(LIBS)
AC_SUBST(ADDITIONAL_OBJECTS) AC_SUBST(ADDITIONAL_OBJECTS)
# Check for xml tools # Check for xml tools
AC_PATH_PROG(XMLLINT, xmllint, no)
AM_CONDITIONAL(HAVE_XMLLINT, test "x$XMLLINT" != "xno")
AC_PATH_PROG(XSLTPROC, xsltproc, no) AC_PATH_PROG(XSLTPROC, xsltproc, no)
AM_CONDITIONAL(HAVE_XSLTPROC, test "x$XSLTPROC" != "xno") AM_CONDITIONAL(HAVE_XSLTPROC, test "x$XSLTPROC" != "xno")
@ -249,6 +252,21 @@ AM_CONDITIONAL(HAVE_XSLTPROC, test "x$XSLTPROC" != "xno")
AC_PATH_PROG(A2X, a2x, no) AC_PATH_PROG(A2X, a2x, no)
AM_CONDITIONAL(HAVE_A2X, test "x$A2X" != "xno") AM_CONDITIONAL(HAVE_A2X, test "x$A2X" != "xno")
# checking xmllint
AC_PATH_PROG(XMLLINT, xmllint, no)
if test "x$XMLLINT" != "xno"; then
AS_ECHO_N("testing xmllint... ")
echo "TEST" > conftest.txt
if $A2X -f docbook conftest.txt 2>/dev/null; then
AS_ECHO("ok")
else
AS_ECHO("failed")
XMLLINT="no"
fi
rm -f conftest.txt conftest.xml
fi
AM_CONDITIONAL(HAVE_XMLLINT, test "x$XMLLINT" != "xno")
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
src/Makefile src/Makefile

View File

@ -1,9 +1,11 @@
MAN5_FILES = \ MAN5_FILES = \
tinyproxy.conf.txt tinyproxy.conf.txt
A2X_ARGS = \ if HAVE_XMLLINT
-d manpage \ A2X_ARGS = -d manpage -f manpage
-f manpage else
A2X_ARGS = -d manpage -f manpage -L
endif
man_MANS = \ man_MANS = \
$(MAN5_FILES:.txt=.5) $(MAN5_FILES:.txt=.5)

View File

@ -1,9 +1,11 @@
MAN8_FILES = \ MAN8_FILES = \
tinyproxy.txt tinyproxy.txt
A2X_ARGS = \ if HAVE_XMLLINT
-d manpage \ A2X_ARGS = -d manpage -f manpage
-f manpage else
A2X_ARGS = -d manpage -f manpage -L
endif
man_MANS = \ man_MANS = \
$(MAN8_FILES:.txt=.8) $(MAN8_FILES:.txt=.8)