| 57 |
57 |
| 58 # Simple uname based platform detection |
58 # Simple uname based platform detection |
| 59 # $PLATFORM is used for platform dependent dependency selection |
59 # $PLATFORM is used for platform dependent dependency selection |
| 60 OS=`uname -s` |
60 OS=`uname -s` |
| 61 OS_VERSION=`uname -r` |
61 OS_VERSION=`uname -r` |
| |
62 ARCH=`uname -m` |
| 62 printf "detect platform... " |
63 printf "detect platform... " |
| 63 if [ "$OS" = "SunOS" ]; then |
64 if [ "$OS" = "SunOS" ]; then |
| 64 PLATFORM="solaris sunos unix svr4" |
65 PLATFORM="solaris sunos unix svr4" |
| 65 elif [ "$OS" = "Linux" ]; then |
66 elif [ "$OS" = "Linux" ]; then |
| 66 PLATFORM="linux unix" |
67 PLATFORM="linux unix" |
| 203 "--datarootdir="*) datarootdir=${D}{ARG#--datarootdir=} ;; |
204 "--datarootdir="*) datarootdir=${D}{ARG#--datarootdir=} ;; |
| 204 "--datadir="*) datadir=${D}{ARG#--datadir=} ;; |
205 "--datadir="*) datadir=${D}{ARG#--datadir=} ;; |
| 205 "--sysconfdir="*) sysconfdir=${D}{ARG#--sysconfdir=} ;; |
206 "--sysconfdir="*) sysconfdir=${D}{ARG#--sysconfdir=} ;; |
| 206 "--sharedstatedir="*) sharedstatedir=${D}{ARG#--sharedstatedir=} ;; |
207 "--sharedstatedir="*) sharedstatedir=${D}{ARG#--sharedstatedir=} ;; |
| 207 "--localstatedir="*) localstatedir=${D}{ARG#--localstatedir=} ;; |
208 "--localstatedir="*) localstatedir=${D}{ARG#--localstatedir=} ;; |
| |
209 "--runstatedir="*) runstatedir=${D}{ARG#--runstatedir=} ;; |
| 208 "--includedir="*) includedir=${D}{ARG#--includedir=} ;; |
210 "--includedir="*) includedir=${D}{ARG#--includedir=} ;; |
| 209 "--infodir="*) infodir=${D}{ARG#--infodir=} ;; |
211 "--infodir="*) infodir=${D}{ARG#--infodir=} ;; |
| 210 "--mandir"*) mandir=${D}{ARG#--mandir} ;; |
212 "--mandir"*) mandir=${D}{ARG#--mandir} ;; |
| 211 "--localedir"*) localedir=${D}{ARG#--localedir} ;; |
213 "--localedir"*) localedir=${D}{ARG#--localedir} ;; |
| 212 "--help"*) printhelp; abort_configure ;; |
214 "--help"*) printhelp; abort_configure ;; |
| 233 : ${sbindir:='${exec_prefix}/sbin'} |
235 : ${sbindir:='${exec_prefix}/sbin'} |
| 234 : ${libdir:='${exec_prefix}/lib'} |
236 : ${libdir:='${exec_prefix}/lib'} |
| 235 : ${libexecdir:='${exec_prefix}/libexec'} |
237 : ${libexecdir:='${exec_prefix}/libexec'} |
| 236 : ${datarootdir:='${prefix}/share'} |
238 : ${datarootdir:='${prefix}/share'} |
| 237 : ${datadir:='${datarootdir}'} |
239 : ${datadir:='${datarootdir}'} |
| 238 : ${sysconfdir:='${prefix}/etc'} |
|
| 239 : ${sharedstatedir:='${prefix}/com'} |
240 : ${sharedstatedir:='${prefix}/com'} |
| 240 : ${localstatedir:='${prefix}/var'} |
241 if [ -z "$sysconfdir" ]; then |
| 241 : ${runstatedir:='${localstatedir}/run'} |
242 if [ "$prefix" = '/usr' ]; then |
| |
243 sysconfdir='/etc' |
| |
244 else |
| |
245 sysconfdir='${prefix}/etc' |
| |
246 fi |
| |
247 fi |
| |
248 if [ -z "$localstatedir" ]; then |
| |
249 if [ "$prefix" = '/usr' ]; then |
| |
250 localstatedir='/var' |
| |
251 else |
| |
252 localstatedir='${prefix}/var' |
| |
253 fi |
| |
254 fi |
| |
255 if [ -z "$runstatedir" ]; then |
| |
256 if [ "$prefix" = '/usr' ]; then |
| |
257 runstatedir='/var/run' |
| |
258 else |
| |
259 runstatedir='${prefix}/var' |
| |
260 fi |
| |
261 fi |
| 242 : ${includedir:='${prefix}/include'} |
262 : ${includedir:='${prefix}/include'} |
| 243 : ${infodir:='${datarootdir}/info'} |
263 : ${infodir:='${datarootdir}/info'} |
| 244 : ${mandir:='${datarootdir}/man'} |
264 : ${mandir:='${datarootdir}/man'} |
| 245 : ${localedir:='${datarootdir}/locale'} |
265 : ${localedir:='${datarootdir}/locale'} |
| 246 |
266 |
| 274 echo ok |
294 echo ok |
| 275 elif [ -f "$prefix/etc/config.site" ]; then |
295 elif [ -f "$prefix/etc/config.site" ]; then |
| 276 printf "loading site defaults... " |
296 printf "loading site defaults... " |
| 277 . "$prefix/etc/config.site" |
297 . "$prefix/etc/config.site" |
| 278 echo ok |
298 echo ok |
| |
299 else |
| |
300 # try to detect the correct libdir on our own, except it was changed by the user |
| |
301 if test "$libdir" = '${exec_prefix}/lib'; then |
| |
302 if [ "$OS" = "SunOS" ]; then |
| |
303 test -d "${exec_prefix}/lib/amd64" && libdir='${exec_prefix}/lib/amd64' |
| |
304 else |
| |
305 # check if the standard libdir even exists |
| |
306 if test -d "${exec_prefix}/lib" ; then |
| |
307 : |
| |
308 else |
| |
309 # if it does not, maybe a lib32 exists |
| |
310 test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32' |
| |
311 fi |
| |
312 # now check if there is a special 64bit libdir that we should use |
| |
313 for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do |
| |
314 if [ $ARCH = $i ]; then |
| |
315 test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64' |
| |
316 break |
| |
317 fi |
| |
318 done |
| |
319 fi |
| |
320 fi |
| 279 fi |
321 fi |
| 280 ]]# |
322 ]]# |
| 281 ## End of unparsed content ** |
323 ## End of unparsed content ** |
| 282 |
324 |
| 283 # generate vars.mk |
325 # generate vars.mk |
| 501 done |
542 done |
| 502 #end |
543 #end |
| 503 |
544 |
| 504 # build type |
545 # build type |
| 505 if [ "$BUILD_TYPE" = "debug" ]; then |
546 if [ "$BUILD_TYPE" = "debug" ]; then |
| 506 TEMP_CFLAGS="\${DEBUG_CFLAGS}$TEMP_CFLAGS" |
547 TEMP_CFLAGS="\${DEBUG_CFLAGS} $TEMP_CFLAGS" |
| 507 TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS}$TEMP_CXXFLAGS" |
548 TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS} $TEMP_CXXFLAGS" |
| 508 fi |
549 fi |
| 509 if [ "$BUILD_TYPE" = "release" ]; then |
550 if [ "$BUILD_TYPE" = "release" ]; then |
| 510 TEMP_CFLAGS="\${RELEASE_CFLAGS}$TEMP_CFLAGS" |
551 TEMP_CFLAGS="\${RELEASE_CFLAGS} $TEMP_CFLAGS" |
| 511 TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS}$TEMP_CXXFLAGS" |
552 TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS} $TEMP_CXXFLAGS" |
| 512 fi |
553 fi |
| 513 |
554 |
| 514 # add general dependency flags to flags.mk |
555 # add general dependency flags to flags.mk |
| 515 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
556 echo "# general flags" >> "$TEMP_DIR/flags.mk" |
| 516 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
557 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |