pgpool2.git / summary / log / commit / refs

commit    89c98211e994b111b25f0de7d1829f88cae25cb1
Author:   Yoshiyuki Asaba <y-asaba at pgfoundry.org>
Date:     Fri Feb 16 11:31:55 2007 +0000

    Fixed compile error on MacOS X. MacOS's ld does not have rpath
    option. So add --disable-rpath option to configure for MacOS X.


ChangeLog | 7 +++++++ Makefile.am | 8 ++++++-- configure.in | 11 +++++++++++ pcp/pcp.c | 1 + pcp/pcp_stream.c | 3 +++ pool_connection_pool.c | 1 + pool_query_cache.c | 5 ++++- 7 files changed, 33 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2899cb6d4..f7ae7516a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-02-16 Yoshiyuki Asaba <y-asaba@sraoss.co.jp> + + * Makefile.am, configure.in, pool_connection_pool.c, + pool_query_cache.c, pcp/pcp.c, pcp/pcp_stream.c: Fixed compile + error on MacOS X. MacOS's ld does not have rpath option. So add + --disable-rpath option to configure for MacOS X. + 2007-02-13 Yoshiyuki Asaba <y-asaba@sraoss.co.jp> * Version 1.0.2 diff --git a/Makefile.am b/Makefile.am index a38ff4201..ba5a0d4c2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,11 @@ data_DATA = sql/system_db.sql AM_CPPFLAGS = -Wall -Wmissing-prototypes -Wmissing-declarations -D_GNU_SOURCE -I @PGSQL_INCLUDE_DIR@ -pgpool_LDFLAGS = -lpq -L@PGSQL_LIB_DIR@ -Wl,-rpath,@PGSQL_LIB_DIR@ +if enable_rpath + pgpool_LDFLAGS = -lpq -L@PGSQL_LIB_DIR@ -Wl,-rpath,@PGSQL_LIB_DIR@ +else + pgpool_LDFLAGS = -lpq -L@PGSQL_LIB_DIR@ +endif AM_YFLAGS = -d @@ -34,4 +38,4 @@ EXTRA_DIST = pgpool.8.in sql/system_db.sql doc/pgpool-ja.html doc/pgpool-en.html sample/dist_def_pgbench.sql SUBDIRS = parser pcp -LDADD = parser/libsql-parser.a pcp/libpcp.la +LDADD = parser/libsql-parser.a pcp/libpcp.la parser/nodes.o diff --git a/configure.in b/configure.in index 05b18ee41..798232734 100644 --- a/configure.in +++ b/configure.in @@ -101,6 +101,17 @@ LIBS="$OLD_LIBS" AC_SUBST(PGSQL_INCLUDE_DIR) AC_SUBST(PGSQL_LIB_DIR) +# --enable(disable)-rpath option +AC_ARG_ENABLE(rpath, + [ --disable-rpath do not embed shared library search path in executables], + [case "${enableval}" in + yes) rpath=yes ;; + no) rpath=no ;; + esac], + [rpath=yes] +) +AM_CONDITIONAL([enable_rpath], test x$rpath = xyes) + AM_CONFIG_HEADER(config.h) AC_OUTPUT([Makefile parser/Makefile pcp/Makefile]) diff --git a/pcp/pcp.c b/pcp/pcp.c index cadb542e3..0797225d5 100644 --- a/pcp/pcp.c +++ b/pcp/pcp.c @@ -9,6 +9,7 @@ #include <string.h> #include <stdlib.h> #include <sys/socket.h> +#include <sys/time.h> #include <sys/types.h> #include <sys/un.h> #include <netinet/in.h> diff --git a/pcp/pcp_stream.c b/pcp/pcp_stream.c index a7a461c6c..886925204 100644 --- a/pcp/pcp_stream.c +++ b/pcp/pcp_stream.c @@ -9,6 +9,9 @@ #include <errno.h> #include <unistd.h> #include <time.h> +#include <sys/time.h> +#include <sys/types.h> +#include <unistd.h> #include "pcp.h" #include "pcp_stream.h" diff --git a/pool_connection_pool.c b/pool_connection_pool.c index ced1267ce..7be3716d2 100644 --- a/pool_connection_pool.c +++ b/pool_connection_pool.c @@ -23,6 +23,7 @@ #include "config.h" #include <sys/types.h> +#include <sys/time.h> #include <sys/socket.h> #include <netinet/in.h> #include <sys/un.h> diff --git a/pool_query_cache.c b/pool_query_cache.c index cd2c74109..21eed868f 100644 --- a/pool_query_cache.c +++ b/pool_query_cache.c @@ -25,8 +25,11 @@ #include <errno.h> #include <stdlib.h> #include <string.h> -#include <netinet/in.h> +#include <arpa/inet.h> #include <time.h> +#include <sys/time.h> +#include <sys/types.h> +#include <unistd.h> #include "pool.h" #include "md5.h" [parent: 30835d44f96f]