Remove XSLT config
[yazpp-moved-to-github.git] / configure.in
1 AC_INIT(configure.in)
2 AM_INIT_AUTOMAKE("yaz++",0.8)
3
4 AC_PROG_CC
5 AC_PROG_CPP
6 AC_PROG_CXX
7 AC_HEADER_STDC
8 AM_DISABLE_SHARED
9 AM_PROG_LIBTOOL
10
11 YAZ_INIT(threads,2.0.12)
12 dnl
13 dnl ----- DOCBOOK DTD
14 AC_SUBST(DTD_DIR)
15 AC_ARG_WITH(dtd, [  --with-dtd[=DIR]          use docbookx.dtd in DIR],
16 [
17    if test -f "$withval/docbookx.dtd"; then
18       DTD_DIR=$withval
19    fi
20 ],[
21    AC_MSG_CHECKING(for docbookx.dtd)
22    for d in /usr/share/sgml/docbook/dtd/xml/4.1.2 \
23          /usr/share/sgml/docbook/xml-dtd-4.1.2* \
24          /usr/share/sgml/docbook/xml-dtd-4.1 \
25          /usr/share/sgml/docbook/dtd/xml/4.0 \
26             /usr/lib/sgml/dtd/docbook-xml 
27    do
28      if test -f $d/docbookx.dtd; then
29        AC_MSG_RESULT($d)
30        DTD_DIR=$d
31        break
32      fi
33    done
34    if test -z "$DTD_DIR"; then
35       AC_MSG_RESULT(Not found)
36    fi
37 ])
38 AC_SUBST(DSSSL_DIR)
39 AC_ARG_WITH(dsssl,[  --with-dsssl[=DIR]        use DSSSL in DIR/{html,print}/docbook.dsl],
40 [
41    if test -f "$withval/html/docbook.dsl"; then
42       DSSSL_DIR=$withval
43    fi
44 ],[
45    AC_MSG_CHECKING(for docbook.dsl)
46    for d in /usr/share/sgml/docbook/stylesheet/dsssl/modular \
47             /usr/share/sgml/docbook/dsssl-stylesheets-1.* \
48             /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh 
49    do
50      if test -f $d/html/docbook.dsl; then
51        AC_MSG_RESULT($d)
52        DSSSL_DIR=$d
53        break
54      fi
55    done
56    if test -z "$DSSSL_DIR"; then
57       AC_MSG_RESULT(Not found)
58    fi
59 ])
60 dnl 
61
62 AC_ARG_ENABLE(zoom,[  --disable-zoom          disable ZOOM (for old C++ compilers)],[enable_zoom=$enableval],[enable_zoom=yes])
63 AM_CONDITIONAL(ZOOM, test $enable_zoom = "yes")
64
65 AC_SUBST(YAZPP_SRC_ROOT)
66 AC_SUBST(YAZPP_BUILD_ROOT)
67 YAZPP_SRC_ROOT=`cd ${srcdir}; pwd`
68 YAZPP_BUILD_ROOT=`pwd`
69
70 AC_OUTPUT([
71         Makefile
72         src/Makefile
73         include/Makefile
74         include/yaz++/Makefile
75         zlint/Makefile
76         yaz++-config
77         zoom/Makefile
78         doc/Makefile
79         doc/yaz++.xml
80         doc/yazprint.dsl doc/yazphp.dsl doc/yazhtml.dsl
81         doc/tkl.xsl
82 ],[sed s%yaz_echo_source=yes%yaz_echo_source=no%g < yaz++-config >src/yaz++-config && chmod +x yaz++-config src/yaz++-config])