X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=idzebra-config.in;h=ca8f4685863299758d22b663001c14f61768f863;hb=d089fa72c83a673c788d828687dbec88fe9d1c4a;hp=b3c9bd40a4db9453e764320bec695cb3c72a87c5;hpb=780246215d365591585d2457375faf9e36649eec;p=idzebra-moved-to-github.git diff --git a/idzebra-config.in b/idzebra-config.in index b3c9bd4..ca8f468 100755 --- a/idzebra-config.in +++ b/idzebra-config.in @@ -1,18 +1,21 @@ #!/bin/sh -# $Id: idzebra-config.in,v 1.4 2004-11-22 11:26:34 adam Exp $ +# $Id: idzebra-config.in,v 1.12 2006-07-03 20:41:38 adam Exp $ +version=@VERSION@ prefix=@prefix@ -idzebra_echo_cflags=no -idzebra_echo_libs=no -idzebra_echo_help=no -idzebra_echo_tab=no -idzebra_echo_source=yes -idzebra_echo_lalibs=no +exec_prefix=@exec_prefix@ +libdir=@libdir@ +echo_cflags=no +echo_libs=no +echo_help=no +echo_tab=no +echo_source=yes +echo_lalibs=no idzebra_src_root=@IDZEBRA_SRC_ROOT@ idzebra_build_root=@IDZEBRA_BUILD_ROOT@ +package_suffix=@PACKAGE_SUFFIX@ -extralibs="@YAZLIB@ @TCL_LIB@ @EXPAT_LIBS@ @LIBS@" -extralalibs="@YAZLALIB@ @TCL_LIB@ @EXPAT_LIBS@ @LIBS@" -IDZEBRAVERSION=@VERSION@ +extralibs="@YAZLIB@ @TCL_LIB@ @EXPAT_LIBS@ @XSLT_LIBS@ @LIBS@ " +extralalibs="@YAZLALIB@ @TCL_LIB@ @EXPAT_LIBS@ @XSLT_LIBS@ @LIBS@" usage() { @@ -25,15 +28,15 @@ Options: [--lalibs] [--cflags] [--tab] + [--modules] EOF exit $1 } if test $# -eq 0; then - idzebra_echo_help=yes + echo_help=yes fi -modules="" while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; @@ -43,85 +46,83 @@ while test $# -gt 0; do case $1 in --prefix=*) prefix=$optarg + exec_prefix=$prefix + libdir=${exec_prefix}/lib ;; --prefix) echo $prefix exit 0 ;; --version) - echo $IDZEBRAVERSION + echo $version exit 0 ;; --cflags) - idzebra_echo_cflags=yes + echo_cflags=yes ;; --libs) - idzebra_echo_libs=yes + echo_libs=yes ;; --tab) - idzebra_echo_tab=yes + echo_tab=yes ;; --lalibs) - idzebra_echo_lalibs=yes + echo_lalibs=yes ;; -*) - idzebra_echo_help=yes - ;; - *) - modules="$modules $1" + echo_help=yes ;; + *) + echo "$0: unsupported argument" + exit 1 + ;; + esac shift done -IDZEBRALIB="" -IDZEBRALALIB="" IDZEBRAINC="@YAZINC@" -if test -z "$modules"; then - modules="api rset recctrl dict isams isamc isamb data1 bfile dfa util" -fi - -for m in $modules; do - d=$m - if test "$m" = "api"; then - d="index" - fi - if test "$idzebra_echo_source" = "yes"; then - IDZEBRALIB="$IDZEBRALIB -L${idzebra_build_root}/$d/.libs -lidzebra-$m" - IDZEBRALALIB="$IDZEBRALALIB ${idzebra_build_root}/$d/libidzebra-$m.la" - else - IDZEBRALIB="$IDZEBRALIB -lidzebra-$m" - fi -done - -if test "$idzebra_echo_source" = "yes"; then +if test "$echo_source" = "yes"; then + IDZEBRALIB="-L${idzebra_build_root}/index/.libs -lidzebra${package_suffix}" + IDZEBRALALIB="${idzebra_build_root}/index/libidzebra${package_suffix}.la" IDZEBRALIB="$IDZEBRALIB $extralibs" IDZEBRALALIB="$IDZEBRALALIB $extralalibs" IDZEBRAINC="$IDZEBRAINC -I${idzebra_src_root}/include" IDZEBRATAB="${idzebra_src_root}/tab" + IDZEBRAMOD="${idzebra_src_root}/recctrl" else - if test "$prefix" != "/usr"; then - IDZEBRALIB="-L${prefix}/lib $IDZEBRALIB" - IDZEBRAINC="$IDZEBRAINC -I${prefix}/include" + IDZEBRALIB="-lidzebra${package_suffix}" + if test "$libdir" != "/usr/lib"; then + IDZEBRALIB="-L${libdir} $IDZEBRALIB" fi IDZEBRALIB="$IDZEBRALIB $extralibs" IDZEBRALALIB="$IDZEBRALIB" - IDZEBRATAB="@datadir@/idzebra/tab" + IDZEBRAINC="$IDZEBRAINC -I${prefix}/include/idzebra${package_suffix}" + IDZEBRATAB="@datarootdir@/idzebra${package_suffix}/tab" + IDZEBRAMOD="${libdir}/idzebra${package_suffix}/modules" fi -if test "$idzebra_echo_help" = "yes"; then +if test "$echo_help" = "yes"; then usage 1 1>&2 fi -if test "$idzebra_echo_cflags" = "yes"; then +if test "$echo_cflags" = "yes"; then echo $IDZEBRAINC fi -if test "$idzebra_echo_libs" = "yes"; then +if test "$echo_libs" = "yes"; then echo $IDZEBRALIB fi -if test "$idzebra_echo_lalibs" = "yes"; then +if test "$echo_lalibs" = "yes"; then echo $IDZEBRALALIB fi -if test "$idzebra_echo_tab" = "yes"; then +if test "$echo_tab" = "yes"; then echo $IDZEBRATAB fi +if test "$echo_modules" = "yes"; then + echo $IDZEBRAMOD +fi +# Local Variables: +# mode:shell-script +# sh-indentation: 2 +# sh-basic-offset: 4 +# End: