Fix /usr/lib/irtcl
[ir-tcl-moved-to-github.git] / aclocal.m4
1 dnl aclocal.m4 generated automatically by aclocal 1.4-p4
2
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
7
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
12
13 # Use this m4 funciton for autoconf if you use YAZ in your own
14 # configure script.
15 # YAZ_INIT
16
17 AC_DEFUN([YAZ_INIT],
18 [
19         AC_SUBST(YAZLIB)
20         AC_SUBST(YAZLALIB)
21         AC_SUBST(YAZINC)
22         AC_SUBST(YAZVERSION)
23         yazconfig=NONE
24         yazpath=NONE
25         AC_ARG_WITH(yazconfig, [  --with-yazconfig=DIR    yaz-config in DIR (example /home/yaz-1.7)], [yazpath=$withval])
26         if test "x$yazpath" != "xNONE"; then
27                 yazconfig=$yazpath/yaz-config
28         else
29                 if test "x$srcdir" = "x"; then
30                         yazsrcdir=.
31                 else
32                         yazsrcdir=$srcdir
33                 fi
34                 for i in ${yazsrcdir}/../yaz* ${yazsrcdir}/../yaz ../yaz* ../yaz; do
35                         if test -d $i; then
36                                 if test -r $i/yaz-config; then
37                                         yazconfig=$i/yaz-config
38                                 fi
39                         fi
40                 done
41                 if test "x$yazconfig" = "xNONE"; then
42                         AC_PATH_PROG(yazconfig, yaz-config, NONE)
43                 fi
44         fi
45         AC_MSG_CHECKING(for YAZ)
46         if $yazconfig --version >/dev/null 2>&1; then
47                 YAZLIB=`$yazconfig --libs $1`
48                 # if this is empty, it's a simple version YAZ 1.6 script
49                 # so we have to source it instead...
50                 if test "X$YAZLIB" = "X"; then
51                         . $yazconfig
52                 else
53                         YAZLALIB=`$yazconfig --lalibs $1`
54                         YAZINC=`$yazconfig --cflags $1`
55                         YAZVERSION=`$yazconfig --version`
56                 fi
57                 AC_MSG_RESULT($yazconfig)
58         else
59                 AC_MSG_RESULT(Not found)
60                 YAZVERSION=NONE
61         fi
62 ])
63         
64