summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2017-01-04 16:21:27 +0100
committerGitHub <noreply@github.com>2017-01-04 16:21:27 +0100
commit1e934118104d73793f7b9f3dae43e7dcca74ff0e (patch)
treec9e934868bf60414bd2019124ed2d899dca9511b
parent302738dee5dd247881a4a5eba173f4333dc2a7d4 (diff)
parent1b8a6ef561c08097989c63340c369974f5cfadac (diff)
Merge pull request #59 from gmp216/pull
Fix OS X build
-rw-r--r--configure.ac22
-rw-r--r--docs/man5/Makefile.am8
-rw-r--r--docs/man8/Makefile.am8
3 files changed, 30 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index fe19787..3990c2f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -219,7 +219,12 @@ if test x"$debug_enabled" != x"yes" ; then
CFLAGS="-DNDEBUG $CFLAGS"
fi
+AS_ECHO_N(["checking to see if linker understands -z,defs... "])
+LDFLAGS_OLD="-Wl $LDFLAGS"
LDFLAGS="-Wl,-z,defs $LDFLAGS"
+AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+ AS_ECHO("yes"),
+ AS_ECHO("no"); LDFLAGS="$LDFLAGS_OLD")
dnl
dnl Make sure we can actually handle the "--with-*" and "--enable-*" stuff.
@@ -240,8 +245,6 @@ AC_SUBST(LIBS)
AC_SUBST(ADDITIONAL_OBJECTS)
# Check for xml tools
-AC_PATH_PROG(XMLLINT, xmllint, no)
-AM_CONDITIONAL(HAVE_XMLLINT, test "x$XMLLINT" != "xno")
AC_PATH_PROG(XSLTPROC, xsltproc, no)
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)
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([
Makefile
src/Makefile
diff --git a/docs/man5/Makefile.am b/docs/man5/Makefile.am
index b2a9dd3..247b7ef 100644
--- a/docs/man5/Makefile.am
+++ b/docs/man5/Makefile.am
@@ -1,9 +1,11 @@
MAN5_FILES = \
tinyproxy.conf.txt
-A2X_ARGS = \
- -d manpage \
- -f manpage
+if HAVE_XMLLINT
+A2X_ARGS = -d manpage -f manpage
+else
+A2X_ARGS = -d manpage -f manpage -L
+endif
man_MANS = \
$(MAN5_FILES:.txt=.5)
diff --git a/docs/man8/Makefile.am b/docs/man8/Makefile.am
index 9bc4955..1bd0ffa 100644
--- a/docs/man8/Makefile.am
+++ b/docs/man8/Makefile.am
@@ -1,9 +1,11 @@
MAN8_FILES = \
tinyproxy.txt
-A2X_ARGS = \
- -d manpage \
- -f manpage
+if HAVE_XMLLINT
+A2X_ARGS = -d manpage -f manpage
+else
+A2X_ARGS = -d manpage -f manpage -L
+endif
man_MANS = \
$(MAN8_FILES:.txt=.8)