Added configure check for various headers
[yazpp-moved-to-github.git] / configure.in
1 AC_INIT(configure.in)
2 AM_INIT_AUTOMAKE("yaz++",0.9)
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.29)
12 if test -z "$YAZLIB"; then
13         AC_MSG_ERROR([YAZ development libraries missing])
14 fi
15 YAZ_DOC
16 AC_CHECK_HEADERS(unistd.h sys/stat.h sys/time.h sys/types.h)
17
18 AC_ARG_ENABLE(zoom,[  --disable-zoom          disable ZOOM (for old C++ compilers)],[enable_zoom=$enableval],[enable_zoom=yes])
19 AM_CONDITIONAL(ZOOM, test $enable_zoom = "yes")
20
21 AC_SUBST(YAZPP_SRC_ROOT)
22 AC_SUBST(YAZPP_BUILD_ROOT)
23 YAZPP_SRC_ROOT=`cd ${srcdir}; pwd`
24 YAZPP_BUILD_ROOT=`pwd`
25
26 AC_OUTPUT([
27         Makefile
28         src/Makefile
29         include/Makefile
30         include/yaz++/Makefile
31         zlint/Makefile
32         yaz++-config
33         zoom/Makefile
34         doc/Makefile
35         doc/yaz++.xml
36         doc/yazprint.dsl doc/yazphp.dsl doc/yazhtml.dsl
37         doc/tkl.xsl
38 ],[sed s%yaz_echo_source=yes%yaz_echo_source=no%g < yaz++-config >src/yaz++-config && chmod +x yaz++-config src/yaz++-config])