summaryrefslogtreecommitdiff
blob: 5912d35a07cd0f0f832aca272d4edb6af4bd2b58 (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
--- Yap-5.1.2.orig/configure.in	2007-06-21 01:45:42.000000000 +1200
+++ Yap-5.1.2/configure.in	2007-08-20 20:19:45.000000000 +1200
@@ -43,7 +43,7 @@
 	[ --enable-threads           support system threads ],
 	threads="$enableval", threads=no)
 AC_ARG_ENABLE(pthread-locking,
-	[ --pthread-locking           use pthread locking primitives for internal locking (requires threads)  ],
+	[ --enable-pthread-locking   use pthread locking primitives for internal locking (requires threads)  ],
 	pthreadlocking="$enableval", pthreadlocking=no)
 AC_ARG_ENABLE(max-performance,
 	[ --enable-max-performance   try using the best flags for specific architecture ],
@@ -91,22 +91,35 @@
 	fi,
 	[yap_cv_gmp=yes])
 
-AC_ARG_ENABLE(myddas,
-	[ --enable-myddas[[=DIR]]      enable the MYDDAS library],
+AC_ARG_ENABLE(myddas-mysql,
+	[ --enable-myddas-mysql[[=DIR]] enable the MYDDAS MySQL library],
 	if test "$enableval" = yes; then
-		yap_cv_myddas=/usr/
+		yap_cv_myddas_mysql=/usr/
 	elif test "$enableval" = no; then
-		yap_cv_myddas=no
+		yap_cv_myddas_mysql=no
 	else
-		yap_cv_myddas=$enable_myddas
-		LDFLAGS="$LDFLAGS -L${yap_cv_myddas}/lib "
-		CPPFLAGS="$CPPFLAGS -I${yap_cv_myddas}/include "
+		yap_cv_myddas_mysql=$enable_myddas_mysql
+		LDFLAGS="$LDFLAGS -L${yap_cv_myddas_mysql}/lib "
+		CPPFLAGS="$CPPFLAGS -I${yap_cv_myddas_mysql}/include "
 	fi,
-	[yap_cv_myddas=no])
+	[yap_cv_myddas_mysql=no])
+
+AC_ARG_ENABLE(myddas-odbc,
+	[ --enable-myddas-odbc[[=DIR]]  enable the MYDDAS ODBC library],
+	if test "$enableval" = yes; then
+		yap_cv_myddas_odbc=/usr/
+	elif test "$enableval" = no; then
+		yap_cv_myddas_odbc=no
+	else
+		yap_cv_myddas_odbc=$enable_myddas_odbc
+		LDFLAGS="$LDFLAGS -L${yap_cv_myddas_odbc}/lib "
+		CPPFLAGS="$CPPFLAGS -I${yap_cv_myddas_odbc}/include "
+	fi,
+	[yap_cv_myddas_odbc=no])
 
 AC_ARG_ENABLE(myddas-stats,
 	[ --enable-myddas-stats      enable the MYDDAS library statistics support],
-	if test "$yap_cv_myddas" = no; then
+	if test "$yap_cv_myddas_mysql" = no; then
 		myddasstats=no
 	else
 		myddasstats="$enableval"
@@ -114,7 +127,7 @@
 
 AC_ARG_ENABLE(myddas-top-level,
 	[ --enable-myddas-top-level  enable the MYDDAS top-level support to MySQL],
-	if test "$yap_cv_myddas" = no; then
+	if test "$yap_cv_myddas_mysql" = no; then
 	   	myddastoplevel=no
 	else
 		myddastoplevel="$enableval"
@@ -124,8 +137,6 @@
 	[ --with-jpl=JAVA_HOME       use Java instalation in JAVA_HOME],
 	if test "$withval" = yes; then
 		yap_cv_jpl="$JAVA_HOME"
-		dynamic_loading=yes
-		maxmemory=yes
 dnl		threads=yes
 	elif test "$withval" = no; then
 		yap_cv_jpl=no
@@ -410,6 +421,8 @@
 AC_PATH_PROG(INSTALL_INFO,install-info,true,$PATH:/sbin:/usr/sbin:/usr/etc:/usr/local/sbin)
 AC_PATH_PROG(SHELL,sh)
 
+AC_HEADER_STDC
+
 dnl Check for libraries.
 dnl mingw does not get along well with libm
 dnl cygnus and mingw32 also need wsock32 to use sockets.
@@ -464,7 +477,7 @@
   AC_CHECK_LIB(gmp,main)
 fi
 
-if test "$yap_cv_myddas" != "no"
+if test "$yap_cv_myddas_mysql" != "no"
 then
 	dnl check for mysql
 	AC_MSG_CHECKING(for main in -lmysqlclient)
@@ -481,9 +494,26 @@
 	if test "$yap_mysql" = yes 
 	then
                 YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_MYSQL"
-		LIBS="$LIBS -L${yap_cv_myddas}/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv "
+		LIBS="$LIBS -L${yap_cv_myddas_mysql}/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv "
 	fi
-	
+	if test "$yap_mysql" = no
+	then
+		echo "-------------------------------"
+	    	echo "--"
+	    	echo "--"
+	    	echo "--"
+	    	echo "-- There\'s no devel libraries for MySQL"
+	    	echo "--"
+	    	echo "--"
+	    	echo "--"
+	    	echo "-------------------------------"
+	    	exit
+	fi
+	cutc="yes"
+fi
+
+if test "$yap_cv_myddas_odbc" != "no"
+then
 	dnl check for odbc
 	AC_MSG_CHECKING(for main in -lodbc)
 	AC_CACHE_VAL(yap_odbc,[
@@ -502,40 +532,21 @@
 		YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_ODBC"
 		LIBS="$LIBS -lodbc "
 	fi
-	
-	if test "$yap_mysql" = no -a "$yap_odbc" = no
+	if test "$yap_odbc" = no
 	then
 		echo "-------------------------------"
 	    	echo "--"
 	    	echo "--"
 	    	echo "--"
-	    	echo "-- There\'s no devel libraries for MySQL or ODBC"
+	    	echo "-- There\'s no devel libraries for ODBC"
 	    	echo "--"
 	    	echo "--"
 	    	echo "--"
 	    	echo "-------------------------------"
 	    	exit
 	fi
-
-	if test "$cutc" = no
-	then
-		echo
-		echo
-		echo "********************************************************"
-		echo
-		echo
-		echo "!!!!!! WARNING !!!!!!"
-		echo "The MYDDAS interface makes no sense without cut-c"
-		echo "Please contact tiagosoares@ncc.up.pt for help"
-		echo 
-		echo "Enabling cut-c"
-		echo
-		echo "********************************************************"
-		echo
-		echo
-		cutc="yes"
-	fi
-fi	
+	cutc="yes"
+fi
 
 if test "$myddasstats" = "yes"
   then
@@ -946,7 +957,6 @@
 fi
 
 dnl Checks for header files.
-AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(arpa/inet.h ctype.h direct.h dirent.h dlfcn.h)
 AC_CHECK_HEADERS(errno.h fcntl.h)
@@ -965,7 +975,7 @@
 then
   AC_CHECK_HEADERS(gmp.h)
 fi
-if test "$yap_cv_myddas" != "no"
+if test "$yap_cv_myddas_mysql" != "no"
 then
   AC_CHECK_HEADERS(mysql/mysql.h)
 fi