X-Git-Url: http://git.indexdata.com/?p=yazpp-moved-to-github.git;a=blobdiff_plain;f=yazpp-config.in;h=0b37a829a315c14ef0f228c8ee2dfa5810690c05;hp=4379120a2945accfa4d94c436ffc88f349a5a48e;hb=9b9ffe1bf48e645ec7a62acd8022a90f6e3a60af;hpb=d186092a74d767a2e1be5e9db685b41ce8f76936 diff --git a/yazpp-config.in b/yazpp-config.in index 4379120..0b37a82 100644 --- a/yazpp-config.in +++ b/yazpp-config.in @@ -1,5 +1,8 @@ #!/bin/sh prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ echo_cflags=no echo_libs=no echo_help=no @@ -27,44 +30,43 @@ EOF } if test $# -eq 0; then - echo_help=yes + echo_help=yes fi while test $# -gt 0; do - case "$1" in - -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - case $1 in - --prefix=*) - prefix=$optarg - ;; - --prefix) - echo $prefix - exit 0 - ;; - --version) - echo $VERSION - exit 0 - ;; - --cflags) - echo_cflags=yes - ;; - --libs) - echo_libs=yes - ;; - --tabs) - echo_tabs=yes - ;; - --lalibs) - echo_lalibs=yes - ;; - -*) - echo_help=yes - ;; - esac - shift + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + case $1 in + --prefix=*) + prefix=$optarg + ;; + --prefix) + echo $prefix + exit 0 + ;; + --version) + echo $VERSION + exit 0 + ;; + --cflags) + echo_cflags=yes + ;; + --libs) + echo_libs=yes + ;; + --tabs) + echo_tabs=yes + ;; + --lalibs) + echo_lalibs=yes + ;; + -*) + echo_help=yes + ;; + esac + shift done libs_short="-lyazpp -lzoompp" @@ -78,27 +80,31 @@ if test "$echo_source" = "yes"; then YAZPPLALIB="${build_root}/src/libyazpp.la $yazlalibs" YAZPPINC="-I${src_root}/include $YAZPPINC" else - if test "$prefix" = "/usr"; then YAZPPLIB="${libs_short} $yazlibs" else - YAZPPLIB="-L${prefix}/lib ${libs_short} $yazlibs" + YAZPPLIB="-L${libdir} ${libs_short} $yazlibs" fi YAZPPLALIB=$YAZPPLIB if test "$prefix" != "/usr"; then - YAZPPINC="-I${prefix}/include $YAZPPINC" + YAZPPINC="-I${includedir} $YAZPPINC" fi fi if test "$echo_help" = "yes"; then - usage 1 1>&2 + usage 1 1>&2 fi if test "$echo_cflags" = "yes"; then - echo $YAZPPINC + echo $YAZPPINC fi if test "$echo_libs" = "yes"; then - echo $YAZPPLIB + echo $YAZPPLIB fi if test "$echo_lalibs" = "yes"; then - echo $YAZPPLALIB + echo $YAZPPLALIB fi +# Local Variables: +# mode:shell-script +# sh-indentation: 2 +# sh-basic-offset: 4 +# End: