Don't pull in libraries and cflags from pg_config; put in link against
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 30 Oct 2006 20:05:13 +0000 (20:05 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 30 Oct 2006 20:05:13 +0000 (20:05 +0000)
libpq the proper way.

Makefile.am
configure.ac

index 15d840d1259048e98758c5d42ff2eb460d78badc..7f07c78c14c4e784dd1f2949ab555e0560bdcce3 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Makefile.am for psqlodbc30w (PostgreSQL ODBC driver)
 #
-# $Header: /home/heikki/psqlodbc-cvs-copy/psqlodbc/Makefile.am,v 1.40 2006/09/06 18:49:41 dpage Exp $
+# $Header: /home/heikki/psqlodbc-cvs-copy/psqlodbc/Makefile.am,v 1.41 2006/10/30 20:05:13 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -15,6 +15,9 @@ lib_LTLIBRARIES = psqlodbca.la
 endif
     
 AM_LDFLAGS = -module -no-undefined -avoid-version
+
+psqlodbca_la_LIBADD = -lpq
+psqlodbcw_la_LIBADD = -lpq
     
 psqlodbca_la_SOURCES = \
    info.c bind.c columninfo.c connection.c convert.c drvconn.c \
@@ -44,7 +47,7 @@ EXTRA_DIST = license.txt readme.txt \
         psqlodbc.sln msdtc_enlist.cpp pgxalib.cpp \
         pgxalib.def odbc.sql odbc-drop.sql \
    odbcapi25w.c \
- \
+\
    docs/index.html docs/config.html \
    docs/faq.html docs/howto-accesslo.html \
    docs/howto-accessvba.html docs/howto-bo.html \
@@ -64,4 +67,3 @@ MAINTAINERCLEANFILES = \
    Makefile.in config.guess config.h.in config.sub configure \
    install-sh missing mkinstalldirs aclocal.m4 ltmain.sh \
    libtool.m4 depcomp
-
index 9daac90b235ee841c8ea4e28adbdf30ae0cd55e7..827691ec235fd2f908dfe47dc544daa00966ede0 100644 (file)
@@ -115,11 +115,9 @@ if test -z "$PG_CONFIG" ; then
   AC_MSG_ERROR([pg_config not found])
 fi
 pg_includedir=`$PG_CONFIG --includedir`
-pg_cflags=`$PG_CONFIG --cflags`
 pg_libdir=`$PG_CONFIG --libdir`
-pg_libs=`$PG_CONFIG --libs`
-CPPFLAGS="$CPPFLAGS $pg_cflags -I$pg_includedir"
-LDFLAGS="$LDFLAGS -L$pg_libdir $pg_libs -lpq"
+CPPFLAGS="$CPPFLAGS -I$pg_includedir"
+LDFLAGS="$LDFLAGS -L$pg_libdir"
 
 
 AC_CONFIG_FILES([Makefile])