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