update configure script / fix configure on freebsd webdav

Thu, 20 Jan 2022 16:04:32 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Thu, 20 Jan 2022 16:04:32 +0100
branch
webdav
changeset 267
4ded424f4a5f
parent 266
783467806e2d
child 268
65ac1342ba1f

update configure script / fix configure on freebsd

configure file | annotate | diff | comparison | revisions
make/configure.vm file | annotate | diff | comparison | revisions
--- a/configure	Thu Dec 03 13:25:26 2020 +0100
+++ b/configure	Thu Jan 20 16:04:32 2022 +0100
@@ -67,40 +67,25 @@
 #
 for ARG in $@
 do
-    if [[ $ARG == --prefix=* ]]; then
-        PREFIX=${ARG:9}
-    elif [[ $ARG = --exec-prefix=* ]]; then
-    	EPREFIX=${ARG:14}
-    elif [[ $ARG = --bindir=* ]]; then
-    	BINDIR=${ARG:9}
-    elif [[ $ARG = --sbindir=* ]]; then
-    	SBINDIR=${ARG:10}
-    elif [[ $ARG = --libdir=* ]]; then
-    	LIBDIR=${ARG:9}
-    elif [[ $ARG = --libexecdir=* ]]; then
-    	LIBEXECDIR=${ARG:13}
-    elif [[ $ARG = --datadir=* ]]; then
-    	DATADIR=${ARG:10}
-    elif [[ $ARG = --sysconfdir=* ]]; then
-    	SYSCONFDIR=${ARG:13}
-    elif [[ $ARG = --sharedstatedir=* ]]; then
-    	SHAREDSTATEDIR=${ARG:17}
-    elif [[ $ARG = --localstatedir=* ]]; then
-    	LOCALSTATEDIR=${ARG:16}
-    elif [[ $ARG = --includedir=* ]]; then
-    	INCLUDEDIR=${ARG:12}
-    elif [[ $ARG = --infodir=* ]]; then
-    	INFODIR=${ARG:10}
-    elif [[ $ARG = --mandir=* ]]; then
-    	MANDIR=${ARG:9}
-    elif [ $ARG = "--help" ]; then
-		printhelp
-        exit 0	
-    elif [[ $ARG == --enable-postgresql ]]; then
-    	FEATURE_POSTGRESQL=on
-    elif [[ $ARG == --disable-postgresql ]]; then
-    	unset FEATURE_POSTGRESQL
-    fi
+    case "$ARG" in
+		"--prefix="*)         PREFIX=${ARG#--prefix=} ;;
+		"--exec-prefix="*)    EPREFIX=${ARG#--exec-prefix=} ;;
+		"--bindir="*)         BINDIR=${ARG#----bindir=} ;;
+		"--sbindir="*)        SBINDIR=${ARG#--sbindir=} ;;
+		"--libdir="*)         LIBDIR=${ARG#--libdir=} ;;
+		"--libexecdir="*)     LIBEXECDIR=${ARG#--libexecdir=} ;;
+		"--datadir="*)        DATADIR=${ARG#--datadir=} ;;
+		"--sysconfdir="*)     SYSCONFDIR=${ARG#--sysconfdir=} ;;
+		"--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;;
+		"--localstatedir="*)  LOCALSTATEDIR=${ARG#--localstatedir=} ;;
+		"--includedir="*)     INCLUDEDIR=${ARG#--includedir=} ;;
+		"--infodir="*)        INFODIR=${ARG#--infodir=} ;;
+		"--mandir"*)          MANDIR=${ARG#--mandir} ;;
+		"--help"*) printhelp; exit 1 ;;
+		"--enable-postgresql") FEATURE_POSTGRESQL=on ;;
+		"--disable-postgresql") unset FEATURE_POSTGRESQL ;;
+		"-"*) echo "unknown option: $ARG"; exit 1 ;;
+	esac
 done
 
 # set dir variables
--- a/make/configure.vm	Thu Dec 03 13:25:26 2020 +0100
+++ b/make/configure.vm	Thu Jan 20 16:04:32 2022 +0100
@@ -119,46 +119,30 @@
 #set( $D = '$' )
 for ARG in $@
 do
-    if [[ $ARG == --prefix=* ]]; then
-        PREFIX=${D}{ARG:9}
-    elif [[ $ARG = --exec-prefix=* ]]; then
-    	EPREFIX=${D}{ARG:14}
-    elif [[ $ARG = --bindir=* ]]; then
-    	BINDIR=${D}{ARG:9}
-    elif [[ $ARG = --sbindir=* ]]; then
-    	SBINDIR=${D}{ARG:10}
-    elif [[ $ARG = --libdir=* ]]; then
-    	LIBDIR=${D}{ARG:9}
-    elif [[ $ARG = --libexecdir=* ]]; then
-    	LIBEXECDIR=${D}{ARG:13}
-    elif [[ $ARG = --datadir=* ]]; then
-    	DATADIR=${D}{ARG:10}
-    elif [[ $ARG = --sysconfdir=* ]]; then
-    	SYSCONFDIR=${D}{ARG:13}
-    elif [[ $ARG = --sharedstatedir=* ]]; then
-    	SHAREDSTATEDIR=${D}{ARG:17}
-    elif [[ $ARG = --localstatedir=* ]]; then
-    	LOCALSTATEDIR=${D}{ARG:16}
-    elif [[ $ARG = --includedir=* ]]; then
-    	INCLUDEDIR=${D}{ARG:12}
-    elif [[ $ARG = --infodir=* ]]; then
-    	INFODIR=${D}{ARG:10}
-    elif [[ $ARG = --mandir=* ]]; then
-    	MANDIR=${D}{ARG:9}
-    elif [ $ARG = "--help" ]; then
-		printhelp
-        exit 0	
-    #foreach( $opt in $options )
-    elif [[ $ARG == --${opt.getArgument()}=* ]]; then
-    	${opt.getVarName()}=${opt.getArgValue()}
+    case "$ARG" in
+		"--prefix="*)         PREFIX=${D}{ARG#--prefix=} ;;
+		"--exec-prefix="*)    EPREFIX=${D}{ARG#--exec-prefix=} ;;
+		"--bindir="*)         BINDIR=${D}{ARG#----bindir=} ;;
+		"--sbindir="*)        SBINDIR=${D}{ARG#--sbindir=} ;;
+		"--libdir="*)         LIBDIR=${D}{ARG#--libdir=} ;;
+		"--libexecdir="*)     LIBEXECDIR=${D}{ARG#--libexecdir=} ;;
+		"--datadir="*)        DATADIR=${D}{ARG#--datadir=} ;;
+		"--sysconfdir="*)     SYSCONFDIR=${D}{ARG#--sysconfdir=} ;;
+		"--sharedstatedir="*) SHAREDSTATEDIR=${D}{ARG#--sharedstatedir=} ;;
+		"--localstatedir="*)  LOCALSTATEDIR=${D}{ARG#--localstatedir=} ;;
+		"--includedir="*)     INCLUDEDIR=${D}{ARG#--includedir=} ;;
+		"--infodir="*)        INFODIR=${D}{ARG#--infodir=} ;;
+		"--mandir"*)          MANDIR=${D}{ARG#--mandir} ;;
+		"--help"*) printhelp; exit 1 ;;
+	#foreach( $opt in $options )
+    	"--${opt.getArgument()}="*) ${opt.getVarName()}=${D}{ARG#--${opt.getArgument()}=} ;;
     #end
-    #foreach( $feature in $features )
-    elif [[ $ARG == --enable-${feature.arg} ]]; then
-    	${feature.getVarName()}=on
-    elif [[ $ARG == --disable-${feature.arg} ]]; then
-    	unset ${feature.getVarName()}
-    #end
-    fi
+	#foreach( $feature in $features )
+		"--enable-${feature.arg}") ${feature.getVarName()}=on ;;
+		"--disable-${feature.arg}") unset ${feature.getVarName()} ;;
+	#end
+		"-"*) echo "unknown option: $ARG"; exit 1 ;;
+	esac
 done
 
 # set dir variables

mercurial