X-Git-Url: http://git.indexdata.com/?p=yazpp-moved-to-github.git;a=blobdiff_plain;f=yazpp-config.in;h=d66d4c121659cd89516d07bd8cc5a1693214bb2a;hp=cd5946dd02dd0ef5b1b75e2f0908283010083d28;hb=64579d7f330f966ed5dbd3af26f50507f0b86530;hpb=89722b8558e29bc0cbe6e37337ad4774f34cab55 diff --git a/yazpp-config.in b/yazpp-config.in index cd5946d..d66d4c1 100644 --- a/yazpp-config.in +++ b/yazpp-config.in @@ -1,16 +1,17 @@ #!/bin/sh -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ +prefix="@prefix@" +exec_prefix="@exec_prefix@" +libdir="@libdir@" +includedir="@includedir@" echo_cflags=no echo_libs=no echo_help=no echo_tabs=no echo_source=yes echo_lalibs=no -src_root=@abs_top_srcdir@ -build_root=@abs_top_builddir@ +echo_zoom=no +src_root="@abs_top_srcdir@" +build_root="@abs_top_builddir@" yazlibs="@YAZLIB@ @LIBS@" yazlalibs="@YAZLALIB@ @LIBS@" VERSION=@VERSION@ @@ -30,78 +31,92 @@ 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 + ;; + zoom) + echo_zoom=yes + ;; + -*) + echo_help=yes + ;; + esac + shift done -libs_short="-lyazpp -lzoompp" - YAZPPINC="@YAZINC@" +YAZPPLALIB="$yazlalibs" +YAZPPLIB="$yazlibs" if test "$echo_source" = "yes"; then - YAZPPLIB="-L${build_root}/src/.libs -lyazpp" - YAZPPLIB="$YAZPPLIB -L${build_root}/zoom/.libs -lzoompp" - YAZPPLIB="$YAZPPLIB $yazlibs" - YAZPPLALIB="${build_root}/src/libyazpp.la $yazlalibs" - YAZPPINC="-I${src_root}/include $YAZPPINC" + if test "$echo_zoom" = "yes"; then + YAZPPLIB="-L${build_root}/zoom/.libs -lzoomzpp $YAZPPLIB" + YAZPPLALIB="${build_root}/zoom/libzoompp.la $YAZPPLALIB" + else + YAZPPLIB="-L${build_root}/src/.libs -lyazpp $YAZPPLIB" + YAZPPLALIB="${build_root}/src/libyazpp.la $YAZPPLALIB" + fi + YAZPPINC="$YAZPPINC -I${src_root}/include" else - + if test "$echo_zoom" = "yes"; then + libs_short="-lzoompp" + else + libs_short="-lyazpp" + fi if test "$prefix" = "/usr"; then - YAZPPLIB="${libs_short} $yazlibs" + YAZPPLIB="${libs_short} $YAZPPLIB" else - YAZPPLIB="-L${libdir} ${libs_short} $yazlibs" + YAZPPLIB="-L${libdir} ${libs_short} $YAZPPLIB" fi - YAZPPLALIB=$YAZPPLIB + YAZPPLALIB="$YAZPPLIB" if test "$prefix" != "/usr"; then - YAZPPINC="-I${includedir} $YAZPPINC" + YAZPPINC="$YAZPPINC -I${includedir}" 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: