1#!/bin/sh 2 3glib_libs="@GLIB_LIBS@" 4glib_cflags="@GLIB_CFLAGS@" 5 6prefix=@prefix@ 7exec_prefix=@exec_prefix@ 8exec_prefix_set=no 9 10usage() 11{ 12 cat <<EOF 13Usage: xdelta-config [OPTIONS] [LIBRARIES] 14Options: 15 [--prefix[=DIR]] 16 [--exec-prefix[=DIR]] 17 [--version] 18 [--libs] 19 [--cflags] 20Libraries: 21 xdelta 22EOF 23 exit $1 24} 25 26if test $# -eq 0; then 27 usage 1 1>&2 28fi 29 30lib_xdelta=yes 31 32while test $# -gt 0; do 33 case "$1" in 34 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 35 *) optarg= ;; 36 esac 37 38 case $1 in 39 --prefix=*) 40 prefix=$optarg 41 if test $exec_prefix_set = no ; then 42 exec_prefix=$optarg 43 fi 44 ;; 45 --prefix) 46 echo_prefix=yes 47 ;; 48 --exec-prefix=*) 49 exec_prefix=$optarg 50 exec_prefix_set=yes 51 ;; 52 --exec-prefix) 53 echo_exec_prefix=yes 54 ;; 55 --version) 56# $Format: " echo $ReleaseVersion$" $ */ 57 echo 1.1.4 58 exit 0 59 ;; 60 --cflags) 61 echo_cflags=yes 62 ;; 63 --libs) 64 echo_libs=yes 65 ;; 66 xdelta) 67 lib_xdelta=yes 68 ;; 69 *) 70 usage 1 1>&2 71 ;; 72 esac 73 shift 74done 75 76if test "$echo_prefix" = "yes"; then 77 echo $prefix 78fi 79 80if test "$echo_exec_prefix" = "yes"; then 81 echo $exec_prefix 82fi 83 84if test "$echo_cflags" = "yes"; then 85 if test @includedir@ != /usr/include ; then 86 includes=-I@includedir@ 87 for i in $glib_cflags ; do 88 if test $i = -I@includedir@ ; then 89 includes="" 90 fi 91 done 92 fi 93 echo $includes $glib_cflags 94fi 95 96if test "$echo_libs" = "yes"; then 97 libdirs=-L@libdir@ 98 libsp="" 99 if test "$lib_xdelta" = "yes"; then 100 my_glib_libs= 101 for i in $glib_libs ; do 102 if test $i != -L@libdir@ ; then 103 if test -z "$my_glib_libs" ; then 104 my_glib_libs="$i" 105 else 106 my_glib_libs="$my_glib_libs $i" 107 fi 108 fi 109 done 110 111 libsp="$libsp -lxdelta -ledsio $my_glib_libs" 112 fi 113 114 echo $libdirs $libsp 115fi 116