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
|
--- qp7.2.orig/configure.in 2006-04-06 14:14:33.000000000 +1200
+++ qp7.2/configure.in 2006-08-07 20:12:48.000000000 +1200
@@ -25,7 +25,9 @@
#
DEBUGGING=" -DNDEBUG "
AC_ARG_ENABLE(debug, [ --enable-debug Turn on debugging],
-[ DEBUGGING=])
+[if test "$enable_debug" != no; then
+ DEBUGGING="-DDEBUG_BLOCK -DDEBUG_IO -DDEBUG_MT -DDEBUG_RETRY -DDEBUG_SCHED -DDEBUG_TIMEOUT"
+fi])
AC_SUBST(DEBUGGING)
# Single versus multiple thread configuraation.
@@ -34,8 +36,6 @@
if test "$enable_multiple_threads" != no; then
# Multiple threads is the default.
AC_DEFINE(MULTIPLE_THREADS)
-else
- AC_MSG_WARN(Configuring for single Prolog thread per process)
fi
AC_LANG_CPLUSPLUS
@@ -115,17 +115,13 @@
AC_SUBST(QPPP_TRADITIONAL)
fi
-AC_PATH_PROG(PERL, perl, NO_PERL,\
- $PATH:/bin:/usr/bin:/usr/local/bin:/usr/local/perl/bin)
-
-if test "$PERL" = NO_PERL; then
- AC_MSG_ERROR(perl is required to compile QP)
-fi
+AC_ARG_ENABLE(icm, [ --enable-icm Enable ICM peer-to-peer communication], enable_icm=$enableval, enable_icm=no)
+if test "x$enable_icm" = "xyes"; then
AC_PATH_PROG(ICM, icm, NO_ICM,\
$PATH:/opt/icm/bin:/opt/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/perl/bin)
if test "$ICM" = NO_ICM; then
- AC_MSG_WARN(ICM communication not supported)
+ AC_MSG_ERROR(ICM communication not supported)
TK_ICM=
ICM_LIB=
AC_SUBST(TK_ICM)
@@ -140,11 +136,17 @@
ICM_LIB="-licm -lpthread"
AC_SUBST(ICM_LIB)
fi
+else
+ ICM="NO_ICM"
+fi
+
+AC_ARG_ENABLE(elvin, [ --enable-elvin Enable Elvin subscription/notification communication], enable_elvin=$enableval, enable_elvin=no)
+if test "x$enable_elvin" = "xyes"; then
AC_PATH_PROG(ELVINCONFIG, elvin-config, NO_ELVINCONFIG,\
$PATH:/opt/icm/bin:/opt/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/perl/bin)
if test "$ELVINCONFIG" = NO_ELVINCONFIG; then
- AC_MSG_WARN(Elvin communication not supported)
+ AC_MSG_ERROR(Elvin communication not supported)
ELVIN_LIB=
ELVIN_CFLAGS=
AC_SUBST(ELVIN_LIB)
@@ -160,6 +162,7 @@
AC_SUBST(ELVIN_LIB)
AC_SUBST(ELVIN_CFLAGS)
fi
+fi
GCCINCLUDES=
AC_ARG_WITH(gcclib,
@@ -232,12 +235,12 @@
then
TKDIR=NONE
else
- tkfile=`cat $libtktmp | head -1`
+ tkfile=`cat $libtktmp | head -n 1`
TKDIR=`dirname $tkfile`
TKL=`basename $tkfile .a | sed -e "s/lib//"`
fi
else
- tkfile=`grep libtk\.a $libtktmp | head -1`
+ tkfile=`grep libtk\.a $libtktmp | head -n 1`
TKDIR=`dirname $tkfile`
TKL=`basename $tkfile .a | sed -e "s/lib//"`
fi
@@ -269,12 +272,12 @@
then
TKDIR=NONE
else
- tclfile=`cat $libtcltmp | head -1`
+ tclfile=`cat $libtcltmp | head -n 1`
TCLDIR=`dirname $tclfile`
TCLL=`basename $tclfile .a | sed -e "s/lib//"`
fi
else
- tclfile=`grep libtclstub\.a $libtcltmp | head -1`
+ tclfile=`grep libtclstub\.a $libtcltmp | head -n 1`
TCLDIR=`dirname $tclfile`
TCLL=`basename $tclfile .a | sed -e "s/lib//"`
fi
@@ -304,7 +307,7 @@
then
TKDIR=NONE
else
- tkf=`cat $tktmp | head -1`
+ tkf=`cat $tktmp | head -n 1`
TKHDIR=`dirname $tkf`
fi
rm $tktmp
@@ -360,12 +363,12 @@
then
TKDIR=NONE
else
- tkfile=`cat $libtktmp | head -1`
+ tkfile=`cat $libtktmp | head -n 1`
TKDIR=`dirname $tkfile`
TKL=`basename $tkfile .so | sed -e "s/lib//"`
fi
else
- tkfile=`grep libtk\.so $libtktmp | head -1`
+ tkfile=`grep libtk\.so $libtktmp | head -n 1`
TKDIR=`dirname $tkfile`
TKL=`basename $tkfile .so | sed -e "s/lib//"`
fi
@@ -397,12 +400,12 @@
then
TKDIR=NONE
else
- tclfile=`cat $libtcltmp | head -1`
+ tclfile=`cat $libtcltmp | head -n 1`
TCLDIR=`dirname $tclfile`
TCLL=`basename $tclfile .so | sed -e "s/lib//"`
fi
else
- tclfile=`grep libtcl\.so $libtcltmp | head -1`
+ tclfile=`grep libtcl\.so $libtcltmp | head -n 1`
TCLDIR=`dirname $tclfile`
TCLL=`basename $tclfile .so | sed -e "s/lib//"`
fi
@@ -432,7 +435,7 @@
then
TKDIR=NONE
else
- tkf=`cat $tktmp | head -1`
+ tkf=`cat $tktmp | head -n 1`
TKHDIR=`dirname $tkf`
fi
rm $tktmp
@@ -529,7 +532,7 @@
#----------------------------------------------------------------------------
dnl Check for CPP version
AC_MSG_CHECKING([for GCC version])
-qp_cpp_ver=[`gcc --version 2>/dev/null | head -1 | sed -e 's/^[^[:digit:]]*\([[:digit:]][^[:space:]]*\).*$/\1/'`]
+qp_cpp_ver=[`gcc --version 2>/dev/null | head -n 1 | sed -e 's/^[^[:digit:]]*\([[:digit:]][^[:space:]]*\).*$/\1/'`]
if test -n "$qp_cpp_ver"; then
AC_MSG_RESULT($qp_cpp_ver)
case "$qp_cpp_ver" in
|