#!/bin/sh # Copyright (C) 2005 Network Applied Communication Laboratory Co., Ltd. load_config() { if test "x${prefix}" = "x"; then prefix="%prefix%" fi exec_prefix="%exec_prefix%" bindir="%bindir%" libdir="%libdir%" CC="%CC%" CFLAGS="%CFLAGS%" CPPFLAGS="%CPPFLAGS%" INCLUDES="-I%includedir% %APR_INCLUDES% %DB_INCLUDES%" LDFLAGS="-L%libdir% %LDFLAGS%" LIBS_LD="-lrast %APR_LIBS_LD% %DB_LIBS% %LIBS%" LIBS_LIBTOOL="%libdir%/librast.la %APR_LIBS_LIBTOOL% %DB_LIBS% %LIBS%" encodingdir="%encodingdir%" version="%version%" } usage() { echo "usage: $0 [options]" echo echo "options:" echo " --prefix print PREFIX to rast install" echo " --prefix=XXX set prefix to XXX for remainder of command" echo " --exec-prefix print prefix for executables" echo " --bindir print binary directory path" echo " --libdir print library directory path" echo " --cc print C compiler used" echo " --cflags print C compiler flags" echo " --cppflags print C Preprocessor flags" echo " --includes print include directives" echo " --ldflags print linker flags" echo " --libs-ld print link switches for linking to Rast" echo " --libs-libtool print libtool inputs for linking to Rast" echo " --version print Rast version" } load_config if [ $# -eq 0 ]; then usage exit 1 fi while [ $# -gt 0 ]; do arg="$1" var=`echo $arg | sed -e 's/^[^=]*=//'` case "$arg" in # undocumented. --debug) set -x ;; --prefix) echo $prefix ;; --prefix=*) prefix=$var load_config ;; --exec-prefix) echo $exec_prefix ;; --bindir) echo $bindir ;; --libdir) echo $libdir ;; --cc) echo $CC ;; --cflags) echo $CFLAGS ;; --cppflags) echo $CPPFLAGS | sed -e 's/-I. //' ;; --includes) echo $INCLUDES ;; --ldflags) echo $LDFLAGS ;; --libs-ld) echo $LIBS_LD ;; --libs-libtool) echo $LIBS_LIBTOOL ;; --encodingdir) echo $encodingdir ;; --version) echo $version ;; --help) usage exit 0 ;; --usage) usage exit 0 ;; -?) usage exit 0 ;; *) echo $0: ERROR Unknown Option $arg 1>&2 exit 1; ;; esac shift done