]> git.stg.codes - stg.git/commitdiff
Fixes in dealing with external libs.
authorMaxim Mamontov <faust.madf@gmail.com>
Sun, 1 Feb 2015 15:34:27 +0000 (17:34 +0200)
committerMaxim Mamontov <faust.madf@gmail.com>
Sun, 1 Feb 2015 15:34:27 +0000 (17:34 +0200)
13 files changed:
projects/rscriptd/build
projects/sgauth/build
projects/sgauthstress/build
projects/sgconf/build
projects/sgconf_xml/build
projects/sgconv/build
projects/stargazer/build
projects/stargazer/plugins/Makefile.in
projects/stargazer/plugins/capture/nfqueue/Makefile
projects/stargazer/plugins/configuration/rpcconfig/Makefile
projects/stargazer/plugins/store/firebird/Makefile
projects/stargazer/plugins/store/mysql/Makefile
projects/stargazer/plugins/store/postgresql/Makefile

index 5af638ebb34c42f6140e0a1c049e8d9042987cc2..da5c3b5b3df79f4bc23cf0d492fb5cbd9711c0b2 100755 (executable)
@@ -172,6 +172,8 @@ do
 done
 printf "\n" >> $CONFFILE
 printf "LIB_THREAD=$LIB_THREAD\n" >> $CONFFILE
+printf "CC=$CC\n" >> $CONFFILE
+printf "CXX=$CXX\n" >> $CONFFILE
 printf "CXXFLAGS=$CXXFLAGS\n" >> $CONFFILE
 printf "CFLAGS=$CFLAGS\n" >> $CONFFILE
 printf "LDFLAGS=$LDFLAGS\n" >> $CONFFILE
index 5364845562bee841bb272d26f5af4ef2e74aeed5..0e7e5f01080c81f83de269230c572bd11b9cb2a2 100755 (executable)
@@ -174,6 +174,8 @@ do
 done
 printf "\n" >> $CONFFILE
 printf "LIB_THREAD=$LIB_THREAD\n" >> $CONFFILE
+printf "CC=$CC\n" >> $CONFFILE
+printf "CXX=$CXX\n" >> $CONFFILE
 printf "CXXFLAGS=$CXXFLAGS\n" >> $CONFFILE
 printf "CFLAGS=$CFLAGS\n" >> $CONFFILE
 printf "LDFLAGS=$LDFLAGS\n" >> $CONFFILE
index 8f3395f91ef149d49c93b2d6964299243c54d022..1593af28b623170057d67524474e8432e09a7d3f 100755 (executable)
@@ -156,17 +156,47 @@ fi
 rm -f fake
 rm -f build_check.c
 
-printf "Checking for -lfbclient... "
-$CC $CFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null
-if [ $? != 0 ]
+printf "Checking for fb_config... "
+FB_VERSION=`fb_config --version 2> /dev/null`
+if [ "$?" != "0" ]
 then
-    CHECK_FBCLIENT=no
     printf "no\n"
+    printf "Checking for -lfbclient... "
+    printf "int main() { return 0; }\n" > build_check.c
+    $CXX $CXXFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null
+    if [ $? != 0 ]
+    then
+        CHECK_FBCLIENT=no
+        printf "no\n"
+    else
+        FB_CFLAGS=""
+        FB_LDFLAGS="-lfbclient"
+        CHECK_FBCLIENT=yes
+        printf "yes\n"
+    fi
+    rm -f fake
 else
-    CHECK_FBCLIENT=yes
     printf "yes\n"
+    printf "Checking for fb_config --cflags... "
+    FB_CFLAGS=`fb_config --cflags`
+    if [ "$?" != "0" ]
+    then
+        CHECK_FBCLIENT=no
+        printf "no\n"
+    else
+        printf "[$FB_CFLAGS]\n"
+        printf "Checking for fb_config --libs "
+        FB_LDFLAGS=`fb_config --libs`
+        if [ "$?" != "0" ]
+        then
+            CHECK_FBCLIENT=no
+            printf "no\n"
+        else
+            CHECK_FBCLIENT=yes
+            printf "[$FB_LDFLAGS]\n"
+        fi
+    fi
 fi
-rm -f fake
 
 printf "Checking for mysql_config... "
 MYSQL_VERSION=`mysql_config --version 2> /dev/null`
@@ -208,12 +238,13 @@ else
 fi
 
 printf "Checking for pg_config... "
+printf "#include <libpq-fe.h>\nint main() { return 0; }\n" > build_check.c
 PG_VERSION=`pg_config --version 2> /dev/null`
 if [ $? != 0 ]
 then
     printf "no\n";
     printf "Checking for -lpq... "
-    $CC $CFLAGS $LDFLAGS build_check.c -lpq $LIB_THREAD -o fake > /dev/null 2> /dev/null
+    $CXX $CXXFLAGS $LDFLAGS build_check.c -lpq $LIB_THREAD -o fake > /dev/null 2> /dev/null
     if [ $? != 0 ]
     then
         CHECK_PQ=no
@@ -226,7 +257,7 @@ then
 else
     printf "yes\n";
     printf "Checking for pg_config --includedir... "
-    PG_CFLAGS=`pg_config --includedir 2> /dev/null`
+    PG_CFLAGS="-I"`pg_config --includedir 2> /dev/null`
     if [ $? != 0 ]
     then
         CHECK_PQ=no
@@ -234,7 +265,7 @@ else
     else
         printf "[$PG_CFLAGS]\n"
         printf "Checking for pg_config --libdir... "
-        PG_LDFLAGS=`pg_config --libdir 2> /dev/null`
+        PG_LDFLAGS="-L"`pg_config --libdir 2> /dev/null`
         if [ $? != 0 ]
         then
             CHECK_PQ=no
@@ -278,6 +309,24 @@ printf "DIR_INCLUDE=\$(DIR_BUILD)/../../include\n" >> $CONFFILE
 printf "DIR_MOD=\$(DIR_BUILD)/../stargazer/modules\n" >> $CONFFILE
 printf "DIR_PLUGINS=\$(DIR_BUILD)/../stargazer/plugins\n" >> $CONFFILE
 printf "ARCH=$ARCH\n" >> $CONFFILE
+printf "CHECK_FBCLIENT=$CHECK_FBCLIENT\n" >> $CONFFILE
+if [ "$CHECK_FBCLIENT" = "yes" ]
+then
+    printf "FB_CFLAGS=$FB_CFLAGS\n" >> $CONFFILE
+    printf "FB_LDFLAGS=$FB_LDFLAGS\n" >> $CONFFILE
+fi
+printf "CHECK_MYSQLCLIENT=$CHECK_MYSQLCLIENT\n" >> $CONFFILE
+if [ "$CHECK_MYSQLCLIENT" = "yes" ]
+then
+    printf "MYSQL_CFLAGS=$MYSQL_CFLAGS\n" >> $CONFFILE
+    printf "MYSQL_LDFLAGS=$MYSQL_LDFLAGS\n" >> $CONFFILE
+fi
+printf "CHECK_PQ=$CHECK_PQ\n" >> $CONFFILE
+if [ "$CHECK_PQ" = "yes" ]
+then
+    printf "PG_CFLAGS=$PG_CFLAGS\n" >> $CONFFILE
+    printf "PG_LDFLAGS=$PG_LDFLAGS\n" >> $CONFFILE
+fi
 printf "DEFS=$DEFS\n" >> $CONFFILE
 printf "STG_LIBS=" >> $CONFFILE
 for lib in $STG_LIBS
@@ -292,6 +341,8 @@ do
 done
 printf "\n" >> $CONFFILE
 printf "LIB_THREAD=$LIB_THREAD\n" >> $CONFFILE
+printf "CC=$CC\n" >> $CONFFILE
+printf "CXX=$CXX\n" >> $CONFFILE
 printf "CXXFLAGS=$CXXFLAGS\n" >> $CONFFILE
 printf "CFLAGS=$CFLAGS\n" >> $CONFFILE
 printf "LDFLAGS=$LDFLAGS\n" >> $CONFFILE
index a498e0c5e90c785c6f13348032ef995e7cd04141..0b25a1ca54396ef8fdf8ab10c8a94c62079b1256 100755 (executable)
@@ -191,6 +191,8 @@ do
 done
 printf "\n" >> $CONFFILE
 printf "LIB_THREAD=$LIB_THREAD\n" >> $CONFFILE
+printf "CC=$CC\n" >> $CONFFILE
+printf "CXX=$CXX\n" >> $CONFFILE
 printf "CXXFLAGS=$CXXFLAGS\n" >> $CONFFILE
 printf "CFLAGS=$CFLAGS\n" >> $CONFFILE
 printf "LDFLAGS=$LDFLAGS\n" >> $CONFFILE
index 34cd804ff1dc59dfa17af9f6f3bf3aa0d01a6d98..7b83359b7447d9f4b71b1f249d14397efc2febbe 100755 (executable)
@@ -184,6 +184,8 @@ do
 done
 printf "\n" >> $CONFFILE
 printf "LIB_THREAD=$LIB_THREAD\n" >> $CONFFILE
+printf "CC=$CC\n" >> $CONFFILE
+printf "CXX=$CXX\n" >> $CONFFILE
 printf "CXXFLAGS=$CXXFLAGS\n" >> $CONFFILE
 printf "CFLAGS=$CFLAGS\n" >> $CONFFILE
 printf "LDFLAGS=$LDFLAGS\n" >> $CONFFILE
index e8ad9200bf61bb42244be8a5eee5190ba88f25f8..d158d3202aaf6a633c1a734214c4f16726ef0c98 100755 (executable)
@@ -160,17 +160,47 @@ else
 fi
 rm -f fake
 
-printf "Checking for -lfbclient... "
-$CC $CFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null
-if [ $? != 0 ]
+printf "Checking for fb_config... "
+FB_VERSION=`fb_config --version 2> /dev/null`
+if [ "$?" != "0" ]
 then
-    CHECK_FBCLIENT=no
     printf "no\n"
+    printf "Checking for -lfbclient... "
+    printf "int main() { return 0; }\n" > build_check.c
+    $CXX $CXXFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null
+    if [ $? != 0 ]
+    then
+        CHECK_FBCLIENT=no
+        printf "no\n"
+    else
+        FB_CFLAGS=""
+        FB_LDFLAGS="-lfbclient"
+        CHECK_FBCLIENT=yes
+        printf "yes\n"
+    fi
+    rm -f fake
 else
-    CHECK_FBCLIENT=yes
     printf "yes\n"
+    printf "Checking for fb_config --cflags... "
+    FB_CFLAGS=`fb_config --cflags`
+    if [ "$?" != "0" ]
+    then
+        CHECK_FBCLIENT=no
+        printf "no\n"
+    else
+        printf "[$FB_CFLAGS]\n"
+        printf "Checking for fb_config --libs "
+        FB_LDFLAGS=`fb_config --libs`
+        if [ "$?" != "0" ]
+        then
+            CHECK_FBCLIENT=no
+            printf "no\n"
+        else
+            CHECK_FBCLIENT=yes
+            printf "[$FB_LDFLAGS]\n"
+        fi
+    fi
 fi
-rm -f fake
 
 printf "Checking for mysql_config... "
 printf "#include <mysql.h>\nint main() { return 0; }\n" > build_check.c
@@ -219,7 +249,7 @@ if [ $? != 0 ]
 then
     printf "no\n";
     printf "Checking for -lpq... "
-    $CC $CFLAGS $LDFLAGS build_check.c -lpq $LIB_THREAD -o fake > /dev/null 2> /dev/null
+    $CXX $CXXFLAGS $LDFLAGS build_check.c -lpq $LIB_THREAD -o fake > /dev/null 2> /dev/null
     if [ $? != 0 ]
     then
         CHECK_PQ=no
@@ -232,7 +262,7 @@ then
 else
     printf "yes\n";
     printf "Checking for pg_config --includedir... "
-    PG_CFLAGS=`pg_config --includedir 2> /dev/null`
+    PG_CFLAGS="-I"`pg_config --includedir 2> /dev/null`
     if [ $? != 0 ]
     then
         CHECK_PQ=no
@@ -240,7 +270,7 @@ else
     else
         printf "[$PG_CFLAGS]\n"
         printf "Checking for pg_config --libdir... "
-        PG_LDFLAGS=`pg_config --libdir 2> /dev/null`
+        PG_LDFLAGS="-L"`pg_config --libdir 2> /dev/null`
         if [ $? != 0 ]
         then
             CHECK_PQ=no
@@ -285,6 +315,23 @@ printf "DIR_MOD=\$(DIR_BUILD)/../stargazer/modules\n" >> $CONFFILE
 printf "DIR_PLUGINS=\$(DIR_BUILD)/../stargazer/plugins\n" >> $CONFFILE
 printf "ARCH=$ARCH\n" >> $CONFFILE
 printf "CHECK_FBCLIENT=$CHECK_FBCLIENT\n" >> $CONFFILE
+if [ "$CHECK_FBCLIENT" = "yes" ]
+then
+    printf "FB_CFLAGS=$FB_CFLAGS\n" >> $CONFFILE
+    printf "FB_LDFLAGS=$FB_LDFLAGS\n" >> $CONFFILE
+fi
+printf "CHECK_MYSQLCLIENT=$CHECK_MYSQLCLIENT\n" >> $CONFFILE
+if [ "$CHECK_MYSQLCLIENT" = "yes" ]
+then
+    printf "MYSQL_CFLAGS=$MYSQL_CFLAGS\n" >> $CONFFILE
+    printf "MYSQL_LDFLAGS=$MYSQL_LDFLAGS\n" >> $CONFFILE
+fi
+printf "CHECK_PQ=$CHECK_PQ\n" >> $CONFFILE
+if [ "$CHECK_PQ" = "yes" ]
+then
+    printf "PG_CFLAGS=$PG_CFLAGS\n" >> $CONFFILE
+    printf "PG_LDFLAGS=$PG_LDFLAGS\n" >> $CONFFILE
+fi
 printf "DEFS=$DEFS\n" >> $CONFFILE
 printf "STG_LIBS=" >> $CONFFILE
 for lib in $STG_LIBS
index f8fb73633a1adbe75363327aad3754479e4ca5c9..238ae19414120e4894745b72fc0d286a1ff356f0 100755 (executable)
@@ -208,18 +208,48 @@ else
 fi
 rm -f fake
 
-printf "Checking for -lfbclient... "
-printf "int main() { return 0; }\n" > build_check.c
-$CXX $CXXFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null
-if [ $? != 0 ]
+printf "Checking for fb_config... "
+FB_VERSION=`fb_config --version 2> /dev/null`
+if [ "$?" != "0" ]
 then
-    CHECK_FBCLIENT=no
     printf "no\n"
+    printf "Checking for -lfbclient... "
+    printf "int main() { return 0; }\n" > build_check.c
+    $CXX $CXXFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null
+    if [ $? != 0 ]
+    then
+        CHECK_FBCLIENT=no
+        printf "no\n"
+    else
+        FB_CFLAGS=""
+        FB_LDFLAGS="-lfbclient"
+        CHECK_FBCLIENT=yes
+        printf "yes\n"
+    fi
+    rm -f fake
 else
-    CHECK_FBCLIENT=yes
     printf "yes\n"
+    printf "Checking for fb_config --cflags... "
+    FB_CFLAGS=`fb_config --cflags`
+    if [ "$?" != "0" ]
+    then
+        CHECK_FBCLIENT=no
+        printf "no\n"
+    else
+        printf "[$FB_CFLAGS]\n"
+        printf "Checking for fb_config --libs "
+        FB_LDFLAGS=`fb_config --libs`
+        if [ "$?" != "0" ]
+        then
+            CHECK_FBCLIENT=no
+            printf "no\n"
+        else
+            CHECK_FBCLIENT=yes
+            printf "[$FB_LDFLAGS]\n"
+        fi
+    fi
 fi
-rm -f fake
+
 
 printf "Checking for mysql_config... "
 printf "#include <mysql.h>\nint main() { return 0; }\n" > build_check.c
@@ -235,6 +265,8 @@ then
         printf "no\n"
     else
         CHECK_MYSQLCLIENT=yes
+        MYSQL_CFLAGS=""
+        MYSQL_LDFLAGS="-lmysqlclient_r"
         printf "yes\n"
     fi
     rm -f fake
@@ -281,7 +313,7 @@ then
 else
     printf "yes\n";
     printf "Checking for pg_config --includedir... "
-    PG_CFLAGS=`pg_config --includedir 2> /dev/null`
+    PG_CFLAGS="-I"`pg_config --includedir 2> /dev/null`
     if [ $? != 0 ]
     then
         CHECK_PQ=no
@@ -289,7 +321,7 @@ else
     else
         printf "[$PG_CFLAGS]\n"
         printf "Checking for pg_config --libdir... "
-        PG_LDFLAGS=`pg_config --libdir 2> /dev/null`
+        PG_LDFLAGS="-L"`pg_config --libdir 2> /dev/null`
         if [ $? != 0 ]
         then
             CHECK_PQ=no
@@ -354,6 +386,7 @@ then
     printf "no\n"
 else
     CHECK_NFNETLINK=yes
+    NETLINK_LDFLAGS="-lnfnetlink"
     printf "yes\n"
 fi
 rm -f fake
@@ -367,6 +400,7 @@ then
     printf "no\n"
 else
     CHECK_NFQ=yes
+    NFQ_LDFLAGS="-lnetfilter_queue"
     printf "yes\n"
 fi
 rm -f fake
@@ -430,7 +464,6 @@ if [ "$CHECK_NFNETLINK" = "yes" -a "$CHECK_NFQ" = "yes" ]
 then
     PLUGINS="$PLUGINS
              capture/nfqueue"
-    NFQ_LIBS="-lnfnetlink -lnetfilter_queue"
 fi
 
 printf "OS=$OS\n" > $CONFFILE
@@ -445,13 +478,40 @@ printf "DIR_PLUGINS=\$(DIR_BUILD)/plugins\n" >> $CONFFILE
 printf "ARCH=$ARCH\n" >> $CONFFILE
 printf "CHECK_EXPAT=$CHECK_EXPAT\n" >> $CONFFILE
 printf "CHECK_FBCLIENT=$CHECK_FBCLIENT\n" >> $CONFFILE
+if [ "$CHECK_FBCLIENT" = "yes" ]
+then
+    printf "FB_CFLAGS=$FB_CFLAGS\n" >> $CONFFILE
+    printf "FB_LDFLAGS=$FB_LDFLAGS\n" >> $CONFFILE
+fi
 printf "CHECK_MYSQLCLIENT=$CHECK_MYSQLCLIENT\n" >> $CONFFILE
+if [ "$CHECK_MYSQLCLIENT" = "yes" ]
+then
+    printf "MYSQL_CFLAGS=$MYSQL_CFLAGS\n" >> $CONFFILE
+    printf "MYSQL_LDFLAGS=$MYSQL_LDFLAGS\n" >> $CONFFILE
+fi
 printf "CHECK_PQ=$CHECK_PQ\n" >> $CONFFILE
+if [ "$CHECK_PQ" = "yes" ]
+then
+    printf "PG_CFLAGS=$PG_CFLAGS\n" >> $CONFFILE
+    printf "PG_LDFLAGS=$PG_LDFLAGS\n" >> $CONFFILE
+fi
 printf "CHECK_XMLRPC=$CHECK_XMLRPC\n" >> $CONFFILE
+if [ "$CHECK_XMLRPC" = "yes" ]
+then
+    printf "XMLRPC_CFLAGS=$XMLRPC_CFLAGS\n" >> $CONFFILE
+    printf "XMLRPC_LDFLAGS=$XMLRPC_LDFLAGS\n" >> $CONFFILE
+fi
 printf "CHECK_NFNETLINK=$CHECK_NFNETLINK\n" >> $CONFFILE
+if [ "$CHECK_NFNETLINK" = "yes" ]
+then
+    printf "NETLINK_LDFLAGS=$NETLINK_LDFLAGS\n" >> $CONFFILE
+fi
 printf "CHECK_NFQ=$CHECK_NFQ\n" >> $CONFFILE
+if [ "$CHECK_NFQ" = "yes" ]
+then
+    printf "NFQ_LDFLAGS=$NFQ_LDFLAGS\n" >> $CONFFILE
+fi
 printf "DEFS=$DEFS\n" >> $CONFFILE
-printf "NFQ_LIBS=$NFQ_LIBS\n" >> $CONFFILE
 printf "STG_LIBS=" >> $CONFFILE
 for lib in $STG_LIBS
 do
@@ -464,6 +524,8 @@ do
     printf "$plugin " >> $CONFFILE
 done
 printf "\n" >> $CONFFILE
+printf "CC=$CC\n" >> $CONFFILE
+printf "CXX=$CXX\n" >> $CONFFILE
 printf "CXXFLAGS=$CXXFLAGS\n" >> $CONFFILE
 printf "CFLAGS=$CFLAGS\n" >> $CONFFILE
 printf "LDFLAGS=$LDFLAGS\n" >> $CONFFILE
index efb5d984e4a6cdb2ca947339a2a0c215b2b0cd12..e1ced728b5a221fe5003d58d3d8f906af4c8b8f7 100644 (file)
@@ -25,7 +25,7 @@ endif
 all: $(PROG)
 
 $(PROG): $(OBJS)
-       $(CXX) $^ $(STGLIBS_PATHS) $(STGLIBS_LIBS) $(LIBS) $(LDFLAGS) -o $(PROG)
+       $(CXX) $^ $(LDFLAGS) $(STGLIBS_PATHS) $(STGLIBS_LIBS) $(LIBS) -o $(PROG)
        $(LN) -fs "`pwd`/$(PROG)" $(DIR_MOD)/$(PROG)
 
 clean:
index a9f4a80371df43f5514e2456146015b3192a2d93..05a87af63375e3bc447dbac92d61139a792a6180 100644 (file)
@@ -4,7 +4,7 @@ PROG = mod_cap_nfqueue.so
 
 SRCS = ./nfqueue.cpp
 
-LIBS += $(NFQ_LIBS) $(LIB_THREAD)
+LIBS += $(NFQ_LDFLAGS) $(NETLINK_LDFLAGS) $(LIB_THREAD)
 
 STGLIBS = common \
           logger
index cbbe79c6b855275b2eca3badeec82eb3b287058c..732b0e11396e6c6c249b3725383696695a7b9370 100644 (file)
@@ -15,9 +15,7 @@ SRCS = ./rpcconfig.cpp \
        ./admins_methods.cpp \
        ./messages_methods.cpp
 
-XMLRPC_C_LIBS = $(shell xmlrpc-c-config c++2 abyss-server --libs)
-
-LIBS += $(XMLRPC_C_LIBS) \
+LIBS += $(XMLRPC_LDFLAGS) \
        $(LIB_THREAD)
 
 ifneq ($(OS),linux)
index a6fb9ccd38bbf7fec708ab0dca2b99a0ae6ca07b..cbe8156bcb5f4210d1135c8d212b57e74edee480 100644 (file)
@@ -22,9 +22,6 @@ STGLIBS = ibpp \
          logger \
          crypto
 
-FB_CFLAGS = $(shell fb_config --cflags)
-FB_LDFLAGS = $(shell fb_config --libs)
-
 CXXFLAGS +=  $(FB_CFLAGS)
 LDFLAGS += $(FB_LDFLAGS)
 
index 25a29798a4050ff475bc13caf046b210852f0356..d676c81a18b4c9d647d803545b4025e8648c7e31 100644 (file)
@@ -12,9 +12,6 @@ STGLIBS = common \
          crypto \
          logger
 
-MYSQL_CFLAGS = $(shell mysql_config --cflags)
-MYSQL_LDFLAGS = $(shell mysql_config --libs_r)
-
 CXXFLAGS += $(MYSQL_CFLAGS)
 LIBS += $(MYSQL_LDFLAGS)
 
index ef090f17d498c790542f6f89026583796ce0517c..b59fbbfa0466fc8f731c027d881badec87d4ce87 100644 (file)
@@ -19,11 +19,8 @@ STGLIBS = common \
          crypto \
          logger
 
-PG_CFLAGS = $(shell pg_config --includedir)
-PG_LDFLAGS = $(shell pg_config --libdir)
-
-CXXFLAGS +=  -I $(PG_CFLAGS)
-LDFLAGS += -L $(PG_LDFLAGS)
+CXXFLAGS +=  $(PG_CFLAGS)
+LDFLAGS += $(PG_LDFLAGS)
 
 LIBS += -lpq