~burner/xsb/debianized-xsb

« back to all changes in this revision

Viewing changes to packages/xpath/configure.in

  • Committer: Michael R. Head
  • Date: 2006-09-06 22:11:55 UTC
  • Revision ID: burner@n23-20060906221155-7e398d23438a7ee4
Add the files from the 3.0.1 release package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## File:      configure.in
 
2
## Author(s): Rohan Shirwaikar
 
3
## Contact:   xsb-contact@cs.sunysb.edu
 
4
## 
 
5
## Copyright (C) The Research Foundation of SUNY, 2004
 
6
## 
 
7
## XSB is free software; you can redistribute it and/or modify it under the
 
8
## terms of the GNU Library General Public License as published by the Free
 
9
## Software Foundation; either version 2 of the License, or (at your option)
 
10
## any later version.
 
11
## 
 
12
## XSB is distributed in the hope that it will be useful, but WITHOUT ANY
 
13
## WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
14
## FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for
 
15
## more details.
 
16
## 
 
17
## You should have received a copy of the GNU Library General Public License
 
18
## along with XSB; if not, write to the Free Software Foundation,
 
19
## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
20
##
 
21
## $Id: configure.in,v 1.2 2005/03/06 00:29:02 kifer Exp $
 
22
## 
 
23
##
 
24
 
 
25
dnl  Autoconf script for xpath
 
26
dnl  To rebuild the `configure' script from this, execute the command
 
27
dnl     autoconf
 
28
dnl  in the directory containing this script.
 
29
dnl
 
30
dnl
 
31
 
 
32
AC_PREREQ(2.12)dnl
 
33
 
 
34
AC_INIT(xpathconfig.P)
 
35
 
 
36
SHELL=/bin/sh
 
37
 
 
38
build_dir="`pwd`"
 
39
# strip the last two directories and possibly trailing slashes
 
40
topdir=`echo "${build_dir}" | sed 's,/[[^/]][[^/]]*/*/[[^/]][[^/]]*/*$,,'`
 
41
 
 
42
 
 
43
# Tell where the autoconf scripts are
 
44
AC_CONFIG_AUX_DIR($topdir/build)
 
45
 
 
46
dnl Check configuration for a Unix variant
 
47
echo '
 
48
- You did not tell me what kind of host system you want to configure.
 
49
- I will attempt to guess the kind of system this is.
 
50
' 1>&6
 
51
AC_CANONICAL_HOST
 
52
canonical=$host
 
53
configuration=$host_alias
 
54
 
 
55
 
 
56
# make sure new files are readable 
 
57
umask 022
 
58
 
 
59
 
 
60
ccflags=
 
61
ldflags=
 
62
 
 
63
case "$canonical" in
 
64
     *-cygwin*)
 
65
        pkg_src_dir=$build_dir/cc
 
66
        pkg_libxml_include_dir=$pkg_src_dir/libxml
 
67
        pkg_bin_dir=$pkg_src_dir/bin
 
68
        xmllib_ccflags=" -I$pkg_libxml_include_dir -I$pkg_src_dir "
 
69
        ldflags=" -L$pkg_bin_dir -lxml2 -lz -liconv -lm "
 
70
        ;;
 
71
     *)  # Unix
 
72
        xpath_config_prog="./xml2-config"  # we keep our own copy for Unix
 
73
        
 
74
        if test "$exec_prefix" != "NONE" ; then
 
75
           exec_prefix_option="--exec-prefix=$exec_prefix"
 
76
        fi
 
77
        if test "$prefix" != "NONE" ; then
 
78
           prefix_option="--prefix=$prefix"
 
79
        fi
 
80
 
 
81
        xmllib_ccflags=`sh $xpath_config_prog $exec_prefix_option $prefix_option --cflags`
 
82
        ldflags="`sh $xpath_config_prog $exec_prefix_option $prefix_option --libs`"
 
83
        ;;
 
84
esac
 
85
 
 
86
ccflags="$xmllib_ccflags"       
 
87
if test  "$xmllib_ccflags" != "ERROR" && test "$ldflags" != "ERROR"  ; then
 
88
   support=yes
 
89
else
 
90
   support=no
 
91
fi
 
92
 
 
93
AC_SUBST(support)
 
94
AC_SUBST(ccflags)
 
95
AC_SUBST(ldflags)
 
96
 
 
97
(
 
98
echo ""
 
99
echo "    Xpath support:                          $support"
 
100
if test "$support" = "yes"; then
 
101
   cat <<EOT
 
102
    Xpath C flags:                        $ccflags
 
103
    Xpath loader flags:                   $ldflags
 
104
 
 
105
EOT
 
106
fi
 
107
) | tee Installation_summary
 
108
 
 
109
AC_OUTPUT([xpath_init.P:xpath_init.in])