6398e2c1a09b32671b3a7150893e4ae1fc9d8af1
[yazpp-moved-to-github.git] / unix / configure.in
1 dnl YAZ++ Toolkit configure script.
2 dnl (c) Index Data ApS 1999
3 dnl See the file LICENSE for details.
4 dnl $Id: configure.in,v 1.4 2000-07-04 13:48:49 adam Exp $
5 AC_INIT(../include/yaz-socket-manager.h)
6 dnl
7 dnl ------ Checking programs
8 AC_PROG_CC
9 AC_PROG_CXX
10 AC_PROG_CPP
11 AC_PROG_CXXCPP
12 AC_PROG_INSTALL
13 AC_PROG_RANLIB
14 dnl
15 dnl ------ Look for Yaz
16 dnl See if user specified location of yaz-config; otherwise
17 dnl use ../yaz if is a directory (internal development); otherwise
18 dnl use yaz-config found in PATH.
19 AC_SUBST(YAZINC)
20 AC_SUBST(YAZLIB)
21 yazconfig=NONE
22 yazpath=NONE
23 AC_ARG_WITH(yazconfig, [  --with-yazconfig=DIR      yaz-config in DIR (example /home/yaz-1.6)], [yazpath=$withval])
24 if test "x$yazpath" != "xNONE"; then
25         yazconfig=$yazpath/yaz-config
26 else
27         for i in ../../yaz* ../../yaz; do
28                 if test -d $i; then
29                         if test -r $i/yaz-config; then
30                                 yazconfig=$i/yaz-config
31                         fi
32                 fi
33         done
34         if test "x$yazconfig" = "xNONE"; then
35                 AC_PATH_PROG(yazconfig, yaz-config, NONE)
36         fi
37 fi
38 AC_MSG_CHECKING(for YAZ)
39 if test -r $yazconfig; then
40         . $yazconfig
41         AC_MSG_RESULT($yazconfig)
42 else
43         AC_MSG_RESULT(Not found)
44 fi
45 dnl
46 dnl ------ Makefiles
47 AC_OUTPUT(Makefile ../src/Makefile)