Merge lp:~brianaker/drizzle/autoconf-foo-update into lp:~drizzle-trunk/drizzle/development

Proposed by Brian Aker
Status: Merged
Approved by: Brian Aker
Approved revision: 2498
Merged at revision: 2499
Proposed branch: lp:~brianaker/drizzle/autoconf-foo-update
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 605 lines (+205/-178)
10 files modified
bootstrap.sh (+0/-26)
client/drizzle.cc (+20/-4)
config/autorun.sh (+1/-1)
drizzled/drizzled.cc (+1/-1)
libdrizzle-1.0/structs.h (+2/-3)
libdrizzle/conn.cc (+137/-93)
libdrizzle/conn_uds.cc (+12/-14)
libdrizzle/drizzle.cc (+1/-1)
m4/pkg.m4 (+30/-33)
win32/include.am (+1/-2)
To merge this branch: bzr merge lp:~brianaker/drizzle/autoconf-foo-update
Reviewer Review Type Date Requested Status
Drizzle Merge Team Pending
Review via email: mp+90599@code.launchpad.net
To post a comment you must log in.
2499. By Brian Aker

Fix NI_SERV

2500. By Brian Aker

Fix unix domain socket to not require that we keep the addr structure sitting around.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bootstrap.sh'
--- bootstrap.sh 2011-12-14 20:53:40 +0000
+++ bootstrap.sh 2012-01-30 06:09:24 +0000
@@ -1,31 +1,5 @@
1#!/bin/bash1#!/bin/bash
22
3# Copyright (C) 2011 Brian Aker
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are met:
8#
9# 1. Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution.
14# 3. The name of the author may not be used to endorse or promote products
15# derived from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29if test -f configure; then make clean; make merge-clean; make distclean; fi;3if test -f configure; then make clean; make merge-clean; make distclean; fi;
304
31rm -r -f autom4te.cache5rm -r -f autom4te.cache
326
=== modified file 'client/drizzle.cc'
--- client/drizzle.cc 2011-11-26 23:14:59 +0000
+++ client/drizzle.cc 2012-01-30 06:09:24 +0000
@@ -324,6 +324,8 @@
324 opt_password,324 opt_password,
325 opt_protocol;325 opt_protocol;
326326
327static std::string socket_file;
328
327static const char* get_day_name(int day_of_week)329static const char* get_day_name(int day_of_week)
328{330{
329 switch(day_of_week)331 switch(day_of_week)
@@ -1476,6 +1478,8 @@
1476 ("host,h", po::value<string>(&current_host)->default_value("localhost"),1478 ("host,h", po::value<string>(&current_host)->default_value("localhost"),
1477 _("Connect to host"))1479 _("Connect to host"))
1478 ("password,P", po::value<string>(&current_password)->default_value(PASSWORD_SENTINEL),1480 ("password,P", po::value<string>(&current_password)->default_value(PASSWORD_SENTINEL),
1481 _("Socket file to use when connecting to server."))
1482 ("socket", po::value<string>(&socket_file),
1479 _("Password to use when connecting to server. If password is not given it's asked from the tty."))1483 _("Password to use when connecting to server. If password is not given it's asked from the tty."))
1480 ("port,p", po::value<uint32_t>()->default_value(0),1484 ("port,p", po::value<uint32_t>()->default_value(0),
1481 _("Port number to use for connection or 0 for default to, in order of preference, drizzle.cnf, $DRIZZLE_TCP_PORT, built-in default"))1485 _("Port number to use for connection or 0 for default to, in order of preference, drizzle.cnf, $DRIZZLE_TCP_PORT, built-in default"))
@@ -4199,10 +4203,22 @@
4199 return 1;4203 return 1;
4200 }4204 }
42014205
4202 if ((con= drizzle_con_add_tcp(drizzle, host.c_str(),4206 if (socket_file.size())
4203 opt_drizzle_port, user.c_str(),4207 {
4204 password.c_str(), database.c_str(),4208 if ((con= drizzle_con_add_uds(drizzle, socket_file.c_str(),
4205 global_con_options)) == NULL)4209 user.c_str(), password.c_str(),
4210 database.c_str(),
4211 global_con_options)) == NULL)
4212 {
4213 (void) put_error(con, NULL);
4214 (void) fflush(stdout);
4215 return 1;
4216 }
4217 }
4218 else if ((con= drizzle_con_add_tcp(drizzle, host.c_str(),
4219 opt_drizzle_port, user.c_str(),
4220 password.c_str(), database.c_str(),
4221 global_con_options)) == NULL)
4206 {4222 {
4207 (void) put_error(con, NULL);4223 (void) put_error(con, NULL);
4208 (void) fflush(stdout);4224 (void) fflush(stdout);
42094225
=== modified file 'config/autorun.sh'
--- config/autorun.sh 2011-08-09 05:28:47 +0000
+++ config/autorun.sh 2012-01-30 06:09:24 +0000
@@ -25,4 +25,4 @@
25# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS25# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.26# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727
28autoreconf -ivf28autoreconf --install --force --verbose -Wall
2929
=== modified file 'drizzled/drizzled.cc'
--- drizzled/drizzled.cc 2012-01-06 18:52:56 +0000
+++ drizzled/drizzled.cc 2012-01-30 06:09:24 +0000
@@ -1366,7 +1366,7 @@
1366 }1366 }
1367 catch (po::unknown_option &err)1367 catch (po::unknown_option &err)
1368 {1368 {
1369 unireg_abort << "Use --help to get a list of available options. " << err.what();1369 unireg_abort << "Use --help to get a list of available options. " << err.what();
1370 }1370 }
13711371
1372 try1372 try
13731373
=== modified file 'libdrizzle-1.0/structs.h'
--- libdrizzle-1.0/structs.h 2011-12-28 23:32:47 +0000
+++ libdrizzle-1.0/structs.h 2012-01-30 06:09:24 +0000
@@ -94,7 +94,7 @@
94 in_port_t port;94 in_port_t port;
95 struct addrinfo *addrinfo;95 struct addrinfo *addrinfo;
96 char *host;96 char *host;
97 char host_buffer[NI_MAXHOST];97 char host_buffer[LIBDRIZZLE_NI_MAXHOST];
98};98};
9999
100/**100/**
@@ -102,8 +102,7 @@
102 */102 */
103struct drizzle_con_uds_st103struct drizzle_con_uds_st
104{104{
105 struct addrinfo addrinfo;105 char path_buffer[LIBDRIZZLE_NI_MAXHOST];
106 struct sockaddr_un sockaddr;
107};106};
108107
109/**108/**
110109
=== modified file 'libdrizzle/conn.cc'
--- libdrizzle/conn.cc 2012-01-05 06:31:25 +0000
+++ libdrizzle/conn.cc 2012-01-30 06:09:24 +0000
@@ -1062,7 +1062,7 @@
1062 break;1062 break;
10631063
1064 case DRIZZLE_CON_SOCKET_UDS:1064 case DRIZZLE_CON_SOCKET_UDS:
1065 con->socket.uds.addrinfo.ai_addr= NULL;1065 con->socket.uds.path_buffer[0]= 0;
1066 break;1066 break;
10671067
1068 default:1068 default:
@@ -1150,7 +1150,6 @@
1150 break;1150 break;
11511151
1152 case DRIZZLE_CON_SOCKET_UDS:1152 case DRIZZLE_CON_SOCKET_UDS:
1153 con->addrinfo_next= &(con->socket.uds.addrinfo);
1154 break;1153 break;
11551154
1156 default:1155 default:
@@ -1179,102 +1178,147 @@
1179 con->fd= -1;1178 con->fd= -1;
1180 }1179 }
11811180
1182 if (con->addrinfo_next == NULL)1181 if (con->socket_type == DRIZZLE_CON_SOCKET_UDS)
1183 {1182 {
1184 drizzle_set_error(con->drizzle, __func__, "could not connect");1183#ifndef WIN32
1185 drizzle_state_reset(con);1184 if ((con->fd= socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
1186 return DRIZZLE_RETURN_COULD_NOT_CONNECT;1185 {
1187 }1186 con->drizzle->last_errno= errno;
11881187 return DRIZZLE_RETURN_COULD_NOT_CONNECT;
1189 con->fd= socket(con->addrinfo_next->ai_family,1188 }
1190 con->addrinfo_next->ai_socktype,1189
1191 con->addrinfo_next->ai_protocol);1190 struct sockaddr_un servAddr;
1192 if (con->fd == -1)1191
1193 {1192 memset(&servAddr, 0, sizeof (struct sockaddr_un));
1194 drizzle_set_error(con->drizzle, __func__, "socket:%s", strerror(errno));1193 servAddr.sun_family= AF_UNIX;
1195 con->drizzle->last_errno= errno;1194 strncpy(servAddr.sun_path, con->socket.uds.path_buffer, sizeof(servAddr.sun_path)); /* Copy filename */
1196 return DRIZZLE_RETURN_COULD_NOT_CONNECT;1195
1197 }1196 do {
11981197 if (connect(con->fd, (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0)
1199 dret= _con_setsockopt(con);1198 {
1200 if (dret != DRIZZLE_RETURN_OK)1199 switch (errno)
1201 {1200 {
1202 con->drizzle->last_errno= errno;1201 case EINPROGRESS:
1203 return DRIZZLE_RETURN_COULD_NOT_CONNECT;1202 case EALREADY:
1204 }1203 case EINTR:
12051204 continue;
1206 while (1)1205
1207 {1206 case EISCONN: /* We were spinning waiting on connect */
1208 ret= connect(con->fd, con->addrinfo_next->ai_addr,1207 {
1209 con->addrinfo_next->ai_addrlen);1208 break;
1209 }
1210
1211 default:
1212 con->drizzle->last_errno= errno;
1213 return DRIZZLE_RETURN_COULD_NOT_CONNECT;
1214 }
1215 }
1216 } while (0);
1217
1218 return DRIZZLE_RETURN_OK;
1219#else
1220 return DRIZZLE_RETURN_COULD_NOT_CONNECT;
1221#endif
1222 }
1223 else
1224 {
1225 if (con->addrinfo_next == NULL)
1226 {
1227 drizzle_set_error(con->drizzle, __func__, "could not connect");
1228 drizzle_state_reset(con);
1229 return DRIZZLE_RETURN_COULD_NOT_CONNECT;
1230 }
1231
1232 con->fd= socket(con->addrinfo_next->ai_family,
1233 con->addrinfo_next->ai_socktype,
1234 con->addrinfo_next->ai_protocol);
1235 if (con->fd == -1)
1236 {
1237 drizzle_set_error(con->drizzle, __func__, "socket:%s", strerror(errno));
1238 con->drizzle->last_errno= errno;
1239 return DRIZZLE_RETURN_COULD_NOT_CONNECT;
1240 }
1241
1242 dret= _con_setsockopt(con);
1243 if (dret != DRIZZLE_RETURN_OK)
1244 {
1245 con->drizzle->last_errno= errno;
1246 return DRIZZLE_RETURN_COULD_NOT_CONNECT;
1247 }
1248
1249 while (1)
1250 {
1251 ret= connect(con->fd, con->addrinfo_next->ai_addr,
1252 con->addrinfo_next->ai_addrlen);
12101253
1211#ifdef _WIN321254#ifdef _WIN32
1212 errno = WSAGetLastError();1255 errno = WSAGetLastError();
1213 switch(errno) {1256 switch(errno) {
1214 case WSAEINVAL:1257 case WSAEINVAL:
1215 case WSAEALREADY:1258 case WSAEALREADY:
1216 case WSAEWOULDBLOCK:1259 case WSAEWOULDBLOCK:
1217 errno= EINPROGRESS;1260 errno= EINPROGRESS;
1218 break;1261 break;
1219 case WSAECONNREFUSED:1262 case WSAECONNREFUSED:
1220 errno= ECONNREFUSED;1263 errno= ECONNREFUSED;
1221 break;1264 break;
1222 case WSAENETUNREACH:1265 case WSAENETUNREACH:
1223 errno= ENETUNREACH;1266 errno= ENETUNREACH;
1224 break;1267 break;
1225 case WSAETIMEDOUT:1268 case WSAETIMEDOUT:
1226 errno= ETIMEDOUT;1269 errno= ETIMEDOUT;
1227 break;1270 break;
1228 case WSAECONNRESET:1271 case WSAECONNRESET:
1229 errno= ECONNRESET;1272 errno= ECONNRESET;
1230 break;1273 break;
1231 case WSAEADDRINUSE:1274 case WSAEADDRINUSE:
1232 errno= EADDRINUSE;1275 errno= EADDRINUSE;
1233 break;1276 break;
1234 case WSAEOPNOTSUPP:1277 case WSAEOPNOTSUPP:
1235 errno= EOPNOTSUPP;1278 errno= EOPNOTSUPP;
1236 break;1279 break;
1237 case WSAENOPROTOOPT:1280 case WSAENOPROTOOPT:
1238 errno= ENOPROTOOPT;1281 errno= ENOPROTOOPT;
1239 break;1282 break;
1240 default:1283 default:
1241 break;1284 break;
1242 }1285 }
1243#endif /* _WIN32 */1286#endif /* _WIN32 */
1244 1287
1245 drizzle_log_crazy(con->drizzle, "connect return=%d errno=%s", ret, strerror(errno));1288 drizzle_log_crazy(con->drizzle, "connect return=%d errno=%s", ret, strerror(errno));
12461289
1247 if (ret == 0)1290 if (ret == 0)
1248 {1291 {
1249 con->addrinfo_next= NULL;1292 con->addrinfo_next= NULL;
1250 break;1293 break;
1251 }1294 }
12521295
1253 if (errno == EAGAIN || errno == EINTR)1296 if (errno == EAGAIN || errno == EINTR)
1254 {1297 {
1255 continue;1298 continue;
1256 }1299 }
12571300
1258 if (errno == EINPROGRESS)1301 if (errno == EINPROGRESS)
1259 {1302 {
1260 drizzle_state_pop(con);1303 drizzle_state_pop(con);
1261 drizzle_state_push(con, drizzle_state_connecting);1304 drizzle_state_push(con, drizzle_state_connecting);
1262 return DRIZZLE_RETURN_OK;1305 return DRIZZLE_RETURN_OK;
1263 }1306 }
12641307
1265 if (errno == ECONNREFUSED || errno == ENETUNREACH || errno == ETIMEDOUT)1308 if (errno == ECONNREFUSED || errno == ENETUNREACH || errno == ETIMEDOUT)
1266 {1309 {
1267 con->addrinfo_next= con->addrinfo_next->ai_next;1310 con->addrinfo_next= con->addrinfo_next->ai_next;
1268 return DRIZZLE_RETURN_OK;1311 return DRIZZLE_RETURN_OK;
1269 }1312 }
12701313
1271 drizzle_set_error(con->drizzle, __func__, "connect:%s", strerror(errno));1314 drizzle_set_error(con->drizzle, __func__, "connect:%s", strerror(errno));
1272 con->drizzle->last_errno= errno;1315 con->drizzle->last_errno= errno;
1273 return DRIZZLE_RETURN_COULD_NOT_CONNECT;1316 return DRIZZLE_RETURN_COULD_NOT_CONNECT;
1317 }
1318
1319 drizzle_state_pop(con);
1274 }1320 }
12751321
1276 drizzle_state_pop(con);
1277
1278 return DRIZZLE_RETURN_OK;1322 return DRIZZLE_RETURN_OK;
1279}1323}
12801324
12811325
=== modified file 'libdrizzle/conn_uds.cc'
--- libdrizzle/conn_uds.cc 2011-12-28 21:59:11 +0000
+++ libdrizzle/conn_uds.cc 2012-01-30 06:09:24 +0000
@@ -51,11 +51,15 @@
5151
52 if (con->socket_type == DRIZZLE_CON_SOCKET_UDS)52 if (con->socket_type == DRIZZLE_CON_SOCKET_UDS)
53 {53 {
54 if (con->socket.uds.sockaddr.sun_path[0] != 0)54 if (con->socket.uds.path_buffer[0] != 0)
55 return con->socket.uds.sockaddr.sun_path;55 {
56 return con->socket.uds.path_buffer;
57 }
5658
57 if (con->options & DRIZZLE_CON_MYSQL)59 if (con->options & DRIZZLE_CON_MYSQL)
60 {
58 return DRIZZLE_DEFAULT_UDS_MYSQL;61 return DRIZZLE_DEFAULT_UDS_MYSQL;
62 }
5963
60 return DRIZZLE_DEFAULT_UDS;64 return DRIZZLE_DEFAULT_UDS;
61 }65 }
@@ -77,16 +81,10 @@
77 if (uds == NULL)81 if (uds == NULL)
78 {82 {
79 uds= "";83 uds= "";
80 }84 con->socket.uds.path_buffer[0]= 0;
8185 }
82 con->socket.uds.sockaddr.sun_family= AF_UNIX;86 else
83 strncpy(con->socket.uds.sockaddr.sun_path, uds,87 {
84 sizeof(con->socket.uds.sockaddr.sun_path));88 strncpy(con->socket.uds.path_buffer, uds, sizeof(con->socket.uds.path_buffer));
85 con->socket.uds.sockaddr.sun_path[sizeof(con->socket.uds.sockaddr.sun_path) - 1]= 0;89 }
86
87 con->socket.uds.addrinfo.ai_family= AF_UNIX;
88 con->socket.uds.addrinfo.ai_socktype= SOCK_STREAM;
89 con->socket.uds.addrinfo.ai_protocol= 0;
90 con->socket.uds.addrinfo.ai_addrlen= sizeof(struct sockaddr_un);
91 con->socket.uds.addrinfo.ai_addr= (struct sockaddr *)&(con->socket.uds.sockaddr);
92}90}
9391
=== modified file 'libdrizzle/drizzle.cc'
--- libdrizzle/drizzle.cc 2012-01-05 06:31:25 +0000
+++ libdrizzle/drizzle.cc 2012-01-30 06:09:24 +0000
@@ -492,7 +492,7 @@
492 break;492 break;
493493
494 case DRIZZLE_CON_SOCKET_UDS:494 case DRIZZLE_CON_SOCKET_UDS:
495 drizzle_con_set_uds(con, from->socket.uds.sockaddr.sun_path);495 drizzle_con_set_uds(con, from->socket.uds.path_buffer);
496 break;496 break;
497497
498 default:498 default:
499499
=== modified file 'm4/pkg.m4'
--- m4/pkg.m4 2010-11-17 22:14:45 +0000
+++ m4/pkg.m4 2012-01-30 06:09:24 +0000
@@ -1,4 +1,5 @@
1# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-1# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2# serial 1 (pkg-config-0.24)
2# 3#
3# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.4# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
4#5#
@@ -14,7 +15,7 @@
14#15#
15# You should have received a copy of the GNU General Public License16# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software17# along with this program; if not, write to the Free Software
17# Foundation, Inc., 51 Franklin Place - Suite 330, Boston, MA 02110-1301, USA.18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18#19#
19# As a special exception to the GNU General Public License, if you20# As a special exception to the GNU General Public License, if you
20# distribute this file as part of a program that contains a21# distribute this file as part of a program that contains a
@@ -26,7 +27,10 @@
26AC_DEFUN([PKG_PROG_PKG_CONFIG],27AC_DEFUN([PKG_PROG_PKG_CONFIG],
27[m4_pattern_forbid([^_?PKG_[A-Z_]+$])28[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
28m4_pattern_allow([^PKG_CONFIG(_PATH)?$])29m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
29AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl30AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
31AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
32AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
33
30if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then34if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
31 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])35 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
32fi36fi
@@ -39,7 +43,6 @@
39 AC_MSG_RESULT([no])43 AC_MSG_RESULT([no])
40 PKG_CONFIG=""44 PKG_CONFIG=""
41 fi45 fi
42
43fi[]dnl46fi[]dnl
44])# PKG_PROG_PKG_CONFIG47])# PKG_PROG_PKG_CONFIG
4548
@@ -48,37 +51,31 @@
48# Check to see whether a particular set of modules exists. Similar51# Check to see whether a particular set of modules exists. Similar
49# to PKG_CHECK_MODULES(), but does not set variables or print errors.52# to PKG_CHECK_MODULES(), but does not set variables or print errors.
50#53#
51#54# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
52# Similar to PKG_CHECK_MODULES, make sure that the first instance of55# only at the first occurence in configure.ac, so if the first place
53# this or PKG_CHECK_MODULES is called, or make sure to call56# it's called might be skipped (such as if it is within an "if", you
54# PKG_CHECK_EXISTS manually57# have to call PKG_CHECK_EXISTS manually
55# --------------------------------------------------------------58# --------------------------------------------------------------
56AC_DEFUN([PKG_CHECK_EXISTS],59AC_DEFUN([PKG_CHECK_EXISTS],
57[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl60[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
58if test -n "$PKG_CONFIG" && \61if test -n "$PKG_CONFIG" && \
59 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then62 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
60 m4_ifval([$2], [$2], [:])63 m4_default([$2], [:])
61m4_ifvaln([$3], [else64m4_ifvaln([$3], [else
62 $3])dnl65 $3])dnl
63fi])66fi])
6467
65
66# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])68# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
67# ---------------------------------------------69# ---------------------------------------------
68m4_define([_PKG_CONFIG],70m4_define([_PKG_CONFIG],
69[if test -n "$PKG_CONFIG"; then71[if test -n "$$1"; then
70 if test -n "$$1"; then72 pkg_cv_[]$1="$$1"
71 pkg_cv_[]$1="$$1"73 elif test -n "$PKG_CONFIG"; then
72 else74 PKG_CHECK_EXISTS([$3],
73 PKG_CHECK_EXISTS([$3],75 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
74 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null | sed 's/-I/-isystem/g' `],76 [pkg_failed=yes])
75 [pkg_failed=yes])77 else
76 if test "$GCC" = "yes"; then78 pkg_failed=untried
77 pkg_cv_[]$1=`echo $pkg_cv_[]$1 | sed 's/-I/-isystem/g' `
78 fi
79 fi
80else
81 pkg_failed=untried
82fi[]dnl79fi[]dnl
83])# _PKG_CONFIG80])# _PKG_CONFIG
8481
@@ -120,16 +117,17 @@
120See the pkg-config man page for more details.])117See the pkg-config man page for more details.])
121118
122if test $pkg_failed = yes; then119if test $pkg_failed = yes; then
120 AC_MSG_RESULT([no])
123 _PKG_SHORT_ERRORS_SUPPORTED121 _PKG_SHORT_ERRORS_SUPPORTED
124 if test $_pkg_short_errors_supported = yes; then122 if test $_pkg_short_errors_supported = yes; then
125 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`123 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
126 else 124 else
127 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`125 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
128 fi126 fi
129 # Put the nasty error message in config.log where it belongs127 # Put the nasty error message in config.log where it belongs
130 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD128 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
131129
132 ifelse([$4], , [AC_MSG_ERROR(dnl130 m4_default([$4], [AC_MSG_ERROR(
133[Package requirements ($2) were not met:131[Package requirements ($2) were not met:
134132
135$$1_PKG_ERRORS133$$1_PKG_ERRORS
@@ -137,24 +135,23 @@
137Consider adjusting the PKG_CONFIG_PATH environment variable if you135Consider adjusting the PKG_CONFIG_PATH environment variable if you
138installed software in a non-standard prefix.136installed software in a non-standard prefix.
139137
140_PKG_TEXT138_PKG_TEXT])
141])],139 ])
142 [AC_MSG_RESULT([no])
143 $4])
144elif test $pkg_failed = untried; then140elif test $pkg_failed = untried; then
145 ifelse([$4], , [AC_MSG_FAILURE(dnl141 AC_MSG_RESULT([no])
142 m4_default([$4], [AC_MSG_FAILURE(
146[The pkg-config script could not be found or is too old. Make sure it143[The pkg-config script could not be found or is too old. Make sure it
147is in your PATH or set the PKG_CONFIG environment variable to the full144is in your PATH or set the PKG_CONFIG environment variable to the full
148path to pkg-config.145path to pkg-config.
149146
150_PKG_TEXT147_PKG_TEXT
151148
152To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],149To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
153 [$4])150 ])
154else151else
155 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS152 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
156 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS153 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
157 AC_MSG_RESULT([yes])154 AC_MSG_RESULT([yes])
158 ifelse([$3], , :, [$3])155 $3
159fi[]dnl156fi[]dnl
160])# PKG_CHECK_MODULES157])# PKG_CHECK_MODULES
161158
=== modified file 'win32/include.am'
--- win32/include.am 2011-11-04 21:06:16 +0000
+++ win32/include.am 2012-01-30 06:09:24 +0000
@@ -19,8 +19,7 @@
1919
2020
21if BUILD_WIN3221if BUILD_WIN32
22libdrizzle_2_0_libdrizzle_2_0_la_SOURCES+= win32/conn_uds.cc22libdrizzle_1_0_libdrizzle_la_SOURCES+= win32/conn_uds.cc
23libdrizzle_1_0_libdrizzle_la_SOURCES+= win32/conn_uds.c
24endif23endif
2524
26noinst_HEADERS+= \25noinst_HEADERS+= \