58 --sbindir=DIR system admin executables [EPREFIX/sbin] |
62 --sbindir=DIR system admin executables [EPREFIX/sbin] |
59 --libexecdir=DIR program executables [EPREFIX/libexec] |
63 --libexecdir=DIR program executables [EPREFIX/libexec] |
60 --sysconfdir=DIR system configuration files [PREFIX/etc] |
64 --sysconfdir=DIR system configuration files [PREFIX/etc] |
61 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
65 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
62 --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
66 --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
|
67 --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run] |
63 --libdir=DIR object code libraries [EPREFIX/lib] |
68 --libdir=DIR object code libraries [EPREFIX/lib] |
64 --includedir=DIR C header files [PREFIX/include] |
69 --includedir=DIR C header files [PREFIX/include] |
65 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
70 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
66 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
71 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
67 --infodir=DIR info documentation [DATAROOTDIR/info] |
72 --infodir=DIR info documentation [DATAROOTDIR/info] |
68 --mandir=DIR man documentation [DATAROOTDIR/man] |
73 --mandir=DIR man documentation [DATAROOTDIR/man] |
|
74 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] |
69 |
75 |
70 Optional Features: |
76 Optional Features: |
71 --disable-pg |
77 --disable-pg |
72 |
78 |
73 __EOF__ |
79 __EOF__ |
78 # |
84 # |
79 BUILD_TYPE="default" |
85 BUILD_TYPE="default" |
80 for ARG in "$@" |
86 for ARG in "$@" |
81 do |
87 do |
82 case "$ARG" in |
88 case "$ARG" in |
83 "--prefix="*) PREFIX=${ARG#--prefix=} ;; |
89 "--prefix="*) prefix=${ARG#--prefix=} ;; |
84 "--exec-prefix="*) EPREFIX=${ARG#--exec-prefix=} ;; |
90 "--exec-prefix="*) exec_prefix=${ARG#--exec-prefix=} ;; |
85 "--bindir="*) BINDIR=${ARG#----bindir=} ;; |
91 "--bindir="*) bindir=${ARG#----bindir=} ;; |
86 "--sbindir="*) SBINDIR=${ARG#--sbindir=} ;; |
92 "--sbindir="*) sbindir=${ARG#--sbindir=} ;; |
87 "--libdir="*) LIBDIR=${ARG#--libdir=} ;; |
93 "--libdir="*) libdir=${ARG#--libdir=} ;; |
88 "--libexecdir="*) LIBEXECDIR=${ARG#--libexecdir=} ;; |
94 "--libexecdir="*) libexecdir=${ARG#--libexecdir=} ;; |
89 "--datadir="*) DATADIR=${ARG#--datadir=} ;; |
95 "--datarootdir="*) datarootdir=${ARG#--datarootdir=} ;; |
90 "--sysconfdir="*) SYSCONFDIR=${ARG#--sysconfdir=} ;; |
96 "--datadir="*) datadir=${ARG#--datadir=} ;; |
91 "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;; |
97 "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;; |
92 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
98 "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;; |
93 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
99 "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;; |
94 "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
100 "--includedir="*) includedir=${ARG#--includedir=} ;; |
95 "--mandir"*) MANDIR=${ARG#--mandir} ;; |
101 "--infodir="*) infodir=${ARG#--infodir=} ;; |
|
102 "--mandir"*) mandir=${ARG#--mandir} ;; |
|
103 "--localedir"*) localedir=${ARG#--localedir} ;; |
96 "--help"*) printhelp; abort_configure ;; |
104 "--help"*) printhelp; abort_configure ;; |
97 "--debug") BUILD_TYPE="debug" ;; |
105 "--debug") BUILD_TYPE="debug" ;; |
98 "--release") BUILD_TYPE="release" ;; |
106 "--release") BUILD_TYPE="release" ;; |
99 "--enable-pg") FEATURE_PG=on ;; |
107 "--enable-pg") FEATURE_PG=on ;; |
100 "--disable-pg") unset FEATURE_PG ;; |
108 "--disable-pg") unset FEATURE_PG ;; |
101 "-"*) echo "unknown option: $ARG"; abort_configure ;; |
109 "-"*) echo "unknown option: $ARG"; abort_configure ;; |
102 esac |
110 esac |
103 done |
111 done |
104 |
112 |
105 |
113 |
106 # set dir variables |
114 |
107 : ${EPREFIX:="$PREFIX"} |
115 # set defaults for dir variables |
108 : ${BINDIR:="$EPREFIX/bin"} |
116 : ${exec_prefix:="$prefix"} |
109 : ${SBINDIR:="$EPREFIX/sbin"} |
117 : ${bindir:='${exec_prefix}/bin'} |
110 : ${LIBDIR:="$EPREFIX/lib"} |
118 : ${sbindir:='${exec_prefix}/sbin'} |
111 : ${LIBEXECDIR:="$EPREFIX/libexec"} |
119 : ${libdir:='${exec_prefix}/lib'} |
112 : ${DATADIR:="$PREFIX/share"} |
120 : ${libexecdir:='${exec_prefix}/libexec'} |
113 : ${SYSCONFDIR:="$PREFIX/etc"} |
121 : ${datarootdir:='${prefix}/share'} |
114 : ${SHAREDSTATEDIR:="$PREFIX/com"} |
122 : ${datadir:='${datarootdir}'} |
115 : ${LOCALSTATEDIR:="$PREFIX/var"} |
123 : ${sysconfdir:='${prefix}/etc'} |
116 : ${INCLUDEDIR:="$PREFIX/include"} |
124 : ${sharedstatedir:='${prefix}/com'} |
117 : ${INFODIR:="$PREFIX/info"} |
125 : ${localstatedir:='${prefix}/var'} |
118 : ${MANDIR:="$PREFIX/man"} |
126 : ${runstatedir:='${localstatedir}/run'} |
|
127 : ${includedir:='${prefix}/include'} |
|
128 : ${infodir:='${datarootdir}/info'} |
|
129 : ${mandir:='${datarootdir}/man'} |
|
130 : ${localedir:='${datarootdir}/locale'} |
|
131 |
|
132 # check if a config.site exists and load it |
|
133 if [ -n "$CONFIG_SITE" ]; then |
|
134 # CONFIG_SITE may contain space separated file names |
|
135 for cs in $CONFIG_SITE; do |
|
136 printf "loading defaults from $cs... " |
|
137 . "$cs" |
|
138 echo ok |
|
139 done |
|
140 elif [ -f "$prefix/share/config.site" ]; then |
|
141 printf "loading site defaults... " |
|
142 . "$prefix/share/config.site" |
|
143 echo ok |
|
144 elif [ -f "$prefix/etc/config.site" ]; then |
|
145 printf "loading site defaults... " |
|
146 . "$prefix/etc/config.site" |
|
147 echo ok |
|
148 fi |
119 |
149 |
120 # Test for availability of pkg-config |
150 # Test for availability of pkg-config |
121 PKG_CONFIG=`command -v pkg-config` |
151 PKG_CONFIG=`command -v pkg-config` |
122 : ${PKG_CONFIG:="false"} |
152 : ${PKG_CONFIG:="false"} |
123 |
153 |
168 } |
198 } |
169 |
199 |
170 |
200 |
171 # generate vars.mk |
201 # generate vars.mk |
172 cat > "$TEMP_DIR/vars.mk" << __EOF__ |
202 cat > "$TEMP_DIR/vars.mk" << __EOF__ |
173 PREFIX="$PREFIX" |
203 prefix="$prefix" |
174 EPREFIX="$EPREFIX" |
204 exec_prefix="$exec_prefix" |
175 BINDIR="$BINDIR" |
205 bindir="$bindir" |
176 SBINDIR="$SBINDIR" |
206 sbindir="$sbindir" |
177 LIBDIR="$LIBDIR" |
207 libdir="$libdir" |
178 LIBEXECDIR="$LIBEXECDIR" |
208 libexecdir="$libexecdir" |
179 DATADIR="$DATADIR" |
209 datarootdir="$datarootdir" |
180 SYSCONFDIR="$SYSCONFDIR" |
210 datadir="$datadir" |
181 SHAREDSTATEDIR="$SHAREDSTATEDIR" |
211 sysconfdir="$sysconfdir" |
182 LOCALSTATEDIR="$LOCALSTATEDIR" |
212 sharedstatedir="$sharedstatedir" |
183 INCLUDEDIR="$INCLUDEDIR" |
213 localstatedir="$localstatedir" |
184 INFODIR="$INFODIR" |
214 runstatedir="$runstatedir" |
185 MANDIR="$MANDIR" |
215 includedir="$includedir" |
|
216 infodir="$infodir" |
|
217 mandir="$mandir" |
|
218 localedir="$localedir" |
186 HOST="$HOST" |
219 HOST="$HOST" |
187 PREFIX="$PREFIX" |
220 prefix="$prefix" |
188 INSTALL_DIR="$INSTALL_DIR" |
221 install_dir="$install_dir" |
189 __EOF__ |
222 __EOF__ |
190 sort -u -o "$TEMP_DIR/vars.mk" "$TEMP_DIR/vars.mk" |
|
191 |
|
192 |
223 |
193 # toolchain detection utilities |
224 # toolchain detection utilities |
194 . make/toolchain.sh |
225 . make/toolchain.sh |
195 |
226 |
196 # |
227 # |