update configure script webdav

Sun, 07 Jun 2020 17:18:59 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 07 Jun 2020 17:18:59 +0200
branch
webdav
changeset 250
f4d93355b054
parent 249
3b302093945c
child 251
f727a21497bb

update configure script

configure file | annotate | diff | comparison | revisions
make/configure.vm file | annotate | diff | comparison | revisions
make/project.xml file | annotate | diff | comparison | revisions
make/suncc.mk file | annotate | diff | comparison | revisions
--- a/configure	Sun May 31 19:35:29 2020 +0200
+++ b/configure	Sun Jun 07 17:18:59 2020 +0200
@@ -57,7 +57,7 @@
   --mandir=DIR            man documentation [DATAROOTDIR/man]
 
 Optional Features:
-  --enable-pg
+  --enable-postgresql
 
 __EOF__
 }
@@ -96,10 +96,10 @@
     elif [ $ARG = "--help" ]; then
 		printhelp
         exit 0	
-    elif [[ $ARG == --enable-pg ]]; then
-    	FEATURE_PG=on
-    elif [[ $ARG == --disable-pg ]]; then
-    	unset FEATURE_PG
+    elif [[ $ARG == --enable-postgresql ]]; then
+    	FEATURE_POSTGRESQL=on
+    elif [[ $ARG == --disable-postgresql ]]; then
+    	unset FEATURE_POSTGRESQL
     fi
 done
 
@@ -265,6 +265,7 @@
         fi
         CFLAGS="$CFLAGS `$PKG_CONFIG --cflags libpq`"
         LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs libpq`"
+        CFLAGS="$CFLAGS -DENABLE_POSTGRESQL"    
 		echo yes
         return 0
     done
@@ -469,6 +470,19 @@
 	ERROR=1
 fi
 
+# Features
+if [ ! -z "$FEATURE_POSTGRESQL" ]; then
+	# check dependency
+	dependency_libpq
+	if [ $? -ne 0 ]; then
+		# "auto" features can fail and are just disabled in this case
+		if [ $FEATURE_POSTGRESQL != "auto" ]; then
+			DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED libpq "
+			ERROR=1
+		fi
+	fi
+fi
+
 
 echo >> $TEMP_DIR/config.mk
 if [ ! -z "${CFLAGS}" ]; then
--- a/make/configure.vm	Sun May 31 19:35:29 2020 +0200
+++ b/make/configure.vm	Sun Jun 07 17:18:59 2020 +0200
@@ -534,6 +534,23 @@
 fi
 #end
 
+# Features
+#foreach( $feature in $target.features )
+if [ ! -z "$${feature.getVarName()}" ]; then
+#foreach( $dependency in $feature.dependencies )
+	# check dependency
+	dependency_$dependency
+	if [ $? -ne 0 ]; then
+		# "auto" features can fail and are just disabled in this case
+		if [ $${feature.getVarName()} != "auto" ]; then
+			DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} "
+			ERROR=1
+		fi
+	fi
+#end
+fi
+#end
+
 #foreach( $opt in $target.options )
 # Option: --${opt.argument}
 if [ -z ${D}${opt.getVarName()} ]; then
--- a/make/project.xml	Sun May 31 19:35:29 2020 +0200
+++ b/make/project.xml	Sun Jun 07 17:18:59 2020 +0200
@@ -76,10 +76,11 @@
 	<!-- optional dependencies -->
 	<dependency name="libpq">
 		<pkgconfig>libpq</pkgconfig>
+		<cflags>-DENABLE_POSTGRESQL</cflags>
 	</dependency>
 	
 	<target>
-		<feature name="pg" default="false">
+		<feature name="postgresql" default="false">
 			<dependencies>libpq</dependencies>
 		</feature>
 		<dependencies>libxml2,openssl</dependencies>
--- a/make/suncc.mk	Sun May 31 19:35:29 2020 +0200
+++ b/make/suncc.mk	Sun Jun 07 17:18:59 2020 +0200
@@ -2,9 +2,9 @@
 # suncc toolchain
 #
 
-CFLAGS += -xc99 -g
-LDFLAGS += -Wl,-R,'$$ORIGIN/../lib'
+CFLAGS += -xc99 -g -m64
+LDFLAGS += -m64 -Wl,-R,'$$ORIGIN/../lib'
 
 SHLIB_CFLAGS = -Kpic
-SHLIB_LDFLAGS = -G
+SHLIB_LDFLAGS = -G -m64
 

mercurial