summaryrefslogtreecommitdiff
blob: 7c917582e6fb5325ef3f9e806340cd19454c77da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
--- XSB.orig/build/configure.in	2006-06-25 13:08:48.000000000 +1200
+++ XSB/build/configure.in	2007-02-08 21:01:15.000000000 +1300
@@ -258,9 +258,9 @@
 dnl prefix given by the user. The prefix variable will later get
 dnl the <xsb-version> subdirectory added in.
 orig_prefix=
-if test "$prefix" = "NONE" -o -z "$prefix" ; then
+if test true ; then
+    install_prefix=$prefix/lib/xsb
     prefix=$topdir
-    orig_prefix=$prefix
 else
     dnl strip any trailing slashes in prefix
     prefix=`echo "${prefix}" | sed 's,\([[^/]]\)/*$,\1,'`
@@ -321,7 +321,7 @@
 fi
 
 config_prefix=${topdir}/config
-install_config_prefix=${prefix}/config
+install_config_prefix=${install_prefix}/config
 
 if test "$config_tag" != "NONE" -a -n "$config_tag" ; then
     config_tag="-$config_tag"
@@ -431,11 +431,11 @@
     config_dot_h_templ=def_config.in
 
     dnl Check configuration for a Unix variant
-    if test "$configuration" = "NONE" ; then
-        echo '
-- You did not tell me what kind of host system you want to configure.
-- I will attempt to guess the kind of system this is.
-' 1>&6
+    if test "NONE$configuration" = "NONE" ; then
+#        echo '
+#- You did not tell me what kind of host system you want to configure.
+#- I will attempt to guess the kind of system this is.
+#' 1>&6
         AC_CANONICAL_HOST
         canonical=$host
         configuration=$host_alias
@@ -502,7 +502,7 @@
 
 # site-specific directories
 # where the site is
-test "$site_prefix" = "NONE" && site_prefix=${orig_prefix}/site
+test "NONE$site_prefix" = "NONE" && site_prefix=${install_prefix}/site
 # site-specific config-independent XSB libraries
 site_libdir=${site_prefix}/lib
 # site-specific config-dependent stuff goes
@@ -511,17 +511,17 @@
 site_config_libdir=${site_config_prefix}/lib
 
 # Installation directories: We only check if they exist
-install_libdir=${prefix}/lib
-install_syslibdir=${prefix}/syslib
-install_cmplibdir=${prefix}/cmplib
-install_emudir=${prefix}/emu
-install_scriptdir=${prefix}/bin     # where the xsb invocation script goes
-install_builddir=${prefix}/build    # where the config detection scripts go
-install_prolog_includes=${prefix}/prolog_includes
-install_pkgdir=${prefix}/packages
-install_pkgxmcdir=${prefix}/packages/xmc
-install_examples=${prefix}/examples
-install_etcdir=${prefix}/etc
+install_libdir=${install_prefix}/lib
+install_syslibdir=${install_prefix}/syslib
+install_cmplibdir=${install_prefix}/cmplib
+install_emudir=${install_prefix}/emu
+install_scriptdir=${install_prefix}/bin     # where the xsb invocation script goes
+install_builddir=${install_prefix}/build    # where the config detection scripts go
+install_prolog_includes=${install_prefix}/prolog_includes
+install_pkgdir=${install_prefix}/packages
+install_pkgxmcdir=${install_prefix}/packages/xmc
+install_examples=${install_prefix}/examples
+install_etcdir=${install_prefix}/etc
 
 arch_install_config_prefix=${install_config_prefix}/${full_config_name}
 arch_install_bindir=${arch_install_config_prefix}/bin
@@ -550,7 +550,7 @@
   rm -f  buildxsb.lock
   exit 1
 fi
-
+if false ; then
 # Test if directories exist
 echo "Checking installation directories..."
 
@@ -670,7 +670,7 @@
 test -f .missingdirs.tmp && exit 1
 
 echo "Checking installation directories ... Done"
-
+fi
 
 AC_PROG_CC
 AC_PROG_CPP
@@ -986,7 +986,7 @@
 ODBCSRC=""
 ODBCOBJ=""
 
-if test "${with_odbc+set}" = "set"; then
+if test "${with_odbc}" = "yes"; then
     if test -n "$with_os" ; then
     echo -n ""
 #	AC_DEFINE(XSB_ODBC)
@@ -1024,11 +1024,11 @@
 #	    with_odbc=no
 #	else
 #	    AC_DEFINE(XSB_ODBC)
-        cat <<EOT
-
-Building with support for ODBC
-
-EOT
+#        cat <<EOT
+#
+#Building with support for ODBC
+#
+#EOT
 #	fi
 #	dnl restore CPPFLAGS
 #	CPPFLAGS="${saved_cpp_flags}"
@@ -1039,9 +1039,9 @@
     fi
 fi
 
-if test "${with_odbc+set}" = "set"; then
+if test "${with_odbc}" = "yes"; then
     AC_DEFINE(XSB_ODBC)
-    with_odbc=yes
+#    with_odbc=yes
 fi
 
 INTERPROLOGSRC=""
@@ -1132,8 +1132,8 @@
 AC_SUBST(perl_ccflags)
 AC_SUBST(perl_libs)
 
-
-# Java support
+if test "${with_interprolog}" = "yes"; then
+if test "x$JAVAC" = x; then
 AC_CHECK_PROG(java_support, javac, "yes", "no")
 if test "${java_support}" = "yes"; then
     dnl after AC_CHECK_PROG, ac_dir holds the directory where javac is found
@@ -1141,17 +1141,20 @@
 else
     javac=javac
 fi
-
+else
+  javac="$JAVAC"
+  java_support=yes
+fi
 AC_SUBST(javac)
 AC_SUBST(java_support)
 
-AC_PATH_PROG(java_path,javac,no)
-java_path=`dirname $java_path`
+#AC_PATH_PROG(java_path,javac,no)
+java_path=`dirname $javac`
 java_path=`dirname $java_path`
 java_path=$java_path/include
 #java_path=`echo $java_path | sed 's,bin/javac,include,' `
 
-if test "${with_interprolog}" = "yes"; then
+#if test "${with_interprolog}" = "yes"; then
     if test "${java_support}" != "yes"; then
         echo "Interprolog not supported due to failure to find Java"
         with_interprolog=""
@@ -1175,14 +1178,14 @@
 if test "${enable_profile}" = "yes"; then
     AC_DEFINE(DEBUG)
     AC_DEFINE(PROFILE)
-    do_debugging=yes
+#    do_debugging=yes
 fi
 
 if test "${enable_debug}" = "yes"; then
     AC_DEFINE(NON_OPT_COMPILE)
     AC_DEFINE(DEBUG)
 dnl    AC_DEFINE(CP_DEBUG)
-    do_debugging=yes
+#    do_debugging=yes
 fi
 
 if test "${enable_debug_verbose}" = "yes"; then
@@ -1547,20 +1550,22 @@
 #fi
 
 # dnl ODBC library
-if test "${with_odbc}" = yes ; then
+#if test "${with_odbc}" = yes ; then
    case "$canonical" in
     *-cygwin*)  LDFLAGS="-lodbc32 ${LDFLAGS}"
                 LINKFLAGS="-lodbc32 ${LINKFLAGS}"
         ;;
-    *)          if test -n "${with_iodbc}"; then
-                    LDFLAGS="-liodbc ${LDFLAGS}"
-                    LINKFLAGS="-liodbc ${LINKFLAGS}"
-                else
-                    LDFLAGS="-lodbc ${LDFLAGS}"
-                    LINKFLAGS="-lodbc ${LINKFLAGS}"
+    *)          if test "${with_iodbc}" = "yes"; then
+                    ODBC_CFLAGS="$(iodbc-config --cflags)"
+                    LDFLAGS="$(iodbc-config --libs) ${LDFLAGS}"
+#                    LINKFLAGS="-liodbc ${LINKFLAGS}"
+                elif test "${with_odbc}" = "yes"; then
+                    ODBC_CFLAGS="$(odbc_config --cflags)"
+                    LDFLAGS="$(odbc_config --libs) ${LDFLAGS}"
+#                    LINKFLAGS="-lodbc ${LINKFLAGS}"
                 fi
     esac
-fi
+#fi
 
 # this is needed for -mno-cygwin dll compilation
 DLLTYPE=nodll
@@ -1696,6 +1701,7 @@
 
 AC_SUBST(ODBCSRC)
 AC_SUBST(ODBCOBJ)
+AC_SUBST(ODBC_CFLAGS)
 AC_SUBST(INTERPROLOGSRC)
 AC_SUBST(INTERPROLOGOBJ)
 AC_SUBST(mno_cyg_inclib)
@@ -1726,11 +1732,11 @@
 AC_SUBST(xsb_asm_extension)
 AC_SUBST(xsb_dcl_extension)
 
-AC_OUTPUT([ ${arch_config_prefix}/topMakefile:topMakefile.in
-        ${arch_config_prefix}/emuMakefile:emuMakefile.in
-        ${arch_config_prefix}/modMakefile:modMakefile.in
-        ${arch_config_prefix}/gppMakefile:gppMakefile.in
-        ${arch_config_prefix}/smoMakefile:smoMakefile.in
+AC_OUTPUT([ ${build_dir}/Makefile:topMakefile.in
+        ${emudir}/Makefile:emuMakefile.in
+        ${build_dir}/modMakefile:modMakefile.in
+        ${topdir}/gpp/Makefile:gppMakefile.in
+        ${build_dir}/smoMakefile:smoMakefile.in
         ${arch_config_prefix}/makedef.sh:makedef.sh.in
         ${arch_config_file}:${configuration_templ}
         makexsb:makexsb.in
@@ -1854,10 +1860,10 @@
 
 # This is needed so that *after* XSB is installed in a common directory,
 # users could compile packages that produce arch-specific code.
-chmod 777 ${site_config_libdir};
-chmod a+t ${site_config_libdir};
-chmod 777 ${arch_install_config_libdir};
-chmod a+t ${arch_install_config_libdir};
+# chmod 777 ${site_config_libdir};
+# chmod a+t ${site_config_libdir};
+# chmod 777 ${arch_install_config_libdir};
+# chmod a+t ${arch_install_config_libdir};
 
 
 dnl Add site dynamic libraries to XSB library path
@@ -1904,9 +1910,9 @@
 # configuring for Windows over Samba, NFS, etc.
 chmod 644 ${arch_config_file} \
       ${arch_config_prefix}/xsb_config.h \
-      ${arch_config_prefix}/xsb_debug.h \
-      ${arch_config_prefix}/*Makefile \
-      ${arch_config_prefix}/MSVC*
+      ${arch_config_prefix}/xsb_debug.h
+#      ${arch_config_prefix}/*Makefile \
+#      ${arch_config_prefix}/MSVC*
 
 
 # phantom private_builtin.c file