--- 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