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