65 # |
65 # |
66 # parse arguments |
66 # parse arguments |
67 # |
67 # |
68 for ARG in $@ |
68 for ARG in $@ |
69 do |
69 do |
70 if [[ $ARG == --prefix=* ]]; then |
70 case "$ARG" in |
71 PREFIX=${ARG:9} |
71 "--prefix="*) PREFIX=${ARG#--prefix=} ;; |
72 elif [[ $ARG = --exec-prefix=* ]]; then |
72 "--exec-prefix="*) EPREFIX=${ARG#--exec-prefix=} ;; |
73 EPREFIX=${ARG:14} |
73 "--bindir="*) BINDIR=${ARG#----bindir=} ;; |
74 elif [[ $ARG = --bindir=* ]]; then |
74 "--sbindir="*) SBINDIR=${ARG#--sbindir=} ;; |
75 BINDIR=${ARG:9} |
75 "--libdir="*) LIBDIR=${ARG#--libdir=} ;; |
76 elif [[ $ARG = --sbindir=* ]]; then |
76 "--libexecdir="*) LIBEXECDIR=${ARG#--libexecdir=} ;; |
77 SBINDIR=${ARG:10} |
77 "--datadir="*) DATADIR=${ARG#--datadir=} ;; |
78 elif [[ $ARG = --libdir=* ]]; then |
78 "--sysconfdir="*) SYSCONFDIR=${ARG#--sysconfdir=} ;; |
79 LIBDIR=${ARG:9} |
79 "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;; |
80 elif [[ $ARG = --libexecdir=* ]]; then |
80 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
81 LIBEXECDIR=${ARG:13} |
81 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
82 elif [[ $ARG = --datadir=* ]]; then |
82 "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
83 DATADIR=${ARG:10} |
83 "--mandir"*) MANDIR=${ARG#--mandir} ;; |
84 elif [[ $ARG = --sysconfdir=* ]]; then |
84 "--help"*) printhelp; exit 1 ;; |
85 SYSCONFDIR=${ARG:13} |
85 "--enable-postgresql") FEATURE_POSTGRESQL=on ;; |
86 elif [[ $ARG = --sharedstatedir=* ]]; then |
86 "--disable-postgresql") unset FEATURE_POSTGRESQL ;; |
87 SHAREDSTATEDIR=${ARG:17} |
87 "-"*) echo "unknown option: $ARG"; exit 1 ;; |
88 elif [[ $ARG = --localstatedir=* ]]; then |
88 esac |
89 LOCALSTATEDIR=${ARG:16} |
|
90 elif [[ $ARG = --includedir=* ]]; then |
|
91 INCLUDEDIR=${ARG:12} |
|
92 elif [[ $ARG = --infodir=* ]]; then |
|
93 INFODIR=${ARG:10} |
|
94 elif [[ $ARG = --mandir=* ]]; then |
|
95 MANDIR=${ARG:9} |
|
96 elif [ $ARG = "--help" ]; then |
|
97 printhelp |
|
98 exit 0 |
|
99 elif [[ $ARG == --enable-postgresql ]]; then |
|
100 FEATURE_POSTGRESQL=on |
|
101 elif [[ $ARG == --disable-postgresql ]]; then |
|
102 unset FEATURE_POSTGRESQL |
|
103 fi |
|
104 done |
89 done |
105 |
90 |
106 # set dir variables |
91 # set dir variables |
107 if [ -z "$BINDIR" ]; then |
92 if [ -z "$BINDIR" ]; then |
108 BINDIR=$EPREFIX/bin |
93 BINDIR=$EPREFIX/bin |