1#! /bin/sh 2 3usage() 4{ 5 cat <<EOF 6Usage: xml2-config [OPTION] 7 8Known values for OPTION are: 9 10 --prefix print the install prefix 11 --libs print library linking information 12 --cflags print pre-processor and compiler flags 13 --modules module support enabled 14 --help display this help and exit 15 --version output version information 16EOF 17 18 exit $1 19} 20 21if test $# -eq 0; then 22 usage 1 23fi 24 25while test $# -gt 0; do 26 case "$1" in 27 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 28 *) optarg= ;; 29 esac 30 31 case "$1" in 32 --version) 33 echo 2.9.0 34 exit 0 35 ;; 36 37 --prefix) 38 echo $(xcrun --show-sdk-path)/usr 39 exit 0 40 ;; 41 42 --help) 43 usage 0 44 ;; 45 46 --cflags) 47 echo -I$(xcrun --show-sdk-path)/usr/include/libxml2 48 ;; 49 50 --modules) 51 echo 1 52 ;; 53 54 --libs) 55 echo -lxml2 56 ;; 57 58 *) 59 usage 60 exit 1 61 ;; 62 esac 63 shift 64done 65 66exit 0 67