Alexandre Lision | 7c6f4a6 | 2013-09-05 13:27:01 -0400 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | |
| 3 | # sndfile-play - temporary wrapper script for .libs/sndfile-play |
| 4 | # Generated by libtool (GNU libtool) 2.4 Debian-2.4-2 |
| 5 | # |
| 6 | # The sndfile-play program cannot be directly executed until all the libtool |
| 7 | # libraries that it depends on are installed. |
| 8 | # |
| 9 | # This wrapper script should never be moved out of the build directory. |
| 10 | # If it is, it will not operate correctly. |
| 11 | |
| 12 | # Sed substitution that helps us do robust quoting. It backslashifies |
| 13 | # metacharacters that are still active within double-quoted strings. |
| 14 | sed_quote_subst='s/\([`"$\\]\)/\\\1/g' |
| 15 | |
| 16 | # Be Bourne compatible |
| 17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then |
| 18 | emulate sh |
| 19 | NULLCMD=: |
| 20 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which |
| 21 | # is contrary to our usage. Disable this feature. |
| 22 | alias -g '${1+"$@"}'='"$@"' |
| 23 | setopt NO_GLOB_SUBST |
| 24 | else |
| 25 | case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac |
| 26 | fi |
| 27 | BIN_SH=xpg4; export BIN_SH # for Tru64 |
| 28 | DUALCASE=1; export DUALCASE # for MKS sh |
| 29 | |
| 30 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
| 31 | # if CDPATH is set. |
| 32 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
| 33 | |
| 34 | relink_command="(cd /home/lisional/git/sflphone-android/jni/libsndfile-1.0.25/programs; { test -z \"\${LIBRARY_PATH+set}\" || unset LIBRARY_PATH || { LIBRARY_PATH=; export LIBRARY_PATH; }; }; { test -z \"\${COMPILER_PATH+set}\" || unset COMPILER_PATH || { COMPILER_PATH=; export COMPILER_PATH; }; }; { test -z \"\${GCC_EXEC_PREFIX+set}\" || unset GCC_EXEC_PREFIX || { GCC_EXEC_PREFIX=; export GCC_EXEC_PREFIX; }; }; { test -z \"\${LD_RUN_PATH+set}\" || unset LD_RUN_PATH || { LD_RUN_PATH=; export LD_RUN_PATH; }; }; { test -z \"\${LD_LIBRARY_PATH+set}\" || unset LD_LIBRARY_PATH || { LD_LIBRARY_PATH=; export LD_LIBRARY_PATH; }; }; PATH=/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/lisional/.local/bin:/usr/local/bin:/home/lisional/bin:/home/lisional/Dev/ADT/sdk/tools:/home/lisional/Dev/ADT/sdk/platform-tools:/home/lisional/Dev/ADT/ndk:/home/lisional/.local/bin:/home/lisional/.local/bin:/usr/local/bin:/home/lisional/bin:/home/lisional/Dev/ADT/sdk/tools:/home/lisional/Dev/ADT/sdk/platform-tools:/home/lisional/Dev/ADT/ndk:/home/lisional/.local/bin; export PATH; gcc -g -O2 -std=gnu99 -Wall -Wextra -Wdeclaration-after-statement -Wpointer-arith -funsigned-char -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wbad-function-cast -Wwrite-strings -Wundef -pipe -o \$progdir/\$file sndfile-play.o common.o ../src/.libs/libsndfile.so -lasound -lm -Wl,-rpath -Wl,/home/lisional/git/sflphone-android/jni/libsndfile-1.0.25/src/.libs -Wl,-rpath -Wl,/usr/local/lib)" |
| 35 | |
| 36 | # This environment variable determines our operation mode. |
| 37 | if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then |
| 38 | # install mode needs the following variables: |
| 39 | generated_by_libtool_version='2.4' |
| 40 | notinst_deplibs=' ../src/libsndfile.la' |
| 41 | else |
| 42 | # When we are sourced in execute mode, $file and $ECHO are already set. |
| 43 | if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then |
| 44 | file="$0" |
| 45 | |
| 46 | # A function that is used when there is no print builtin or printf. |
| 47 | func_fallback_echo () |
| 48 | { |
| 49 | eval 'cat <<_LTECHO_EOF |
| 50 | $1 |
| 51 | _LTECHO_EOF' |
| 52 | } |
| 53 | ECHO="printf %s\\n" |
| 54 | fi |
| 55 | |
| 56 | # Very basic option parsing. These options are (a) specific to |
| 57 | # the libtool wrapper, (b) are identical between the wrapper |
| 58 | # /script/ and the wrapper /executable/ which is used only on |
| 59 | # windows platforms, and (c) all begin with the string --lt- |
| 60 | # (application programs are unlikely to have options which match |
| 61 | # this pattern). |
| 62 | # |
| 63 | # There are only two supported options: --lt-debug and |
| 64 | # --lt-dump-script. There is, deliberately, no --lt-help. |
| 65 | # |
| 66 | # The first argument to this parsing function should be the |
| 67 | # script's ../libtool value, followed by no. |
| 68 | lt_option_debug= |
| 69 | func_parse_lt_options () |
| 70 | { |
| 71 | lt_script_arg0=$0 |
| 72 | shift |
| 73 | for lt_opt |
| 74 | do |
| 75 | case "$lt_opt" in |
| 76 | --lt-debug) lt_option_debug=1 ;; |
| 77 | --lt-dump-script) |
| 78 | lt_dump_D=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` |
| 79 | test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. |
| 80 | lt_dump_F=`$ECHO "X$lt_script_arg0" | /usr/bin/sed -e 's/^X//' -e 's%^.*/%%'` |
| 81 | cat "$lt_dump_D/$lt_dump_F" |
| 82 | exit 0 |
| 83 | ;; |
| 84 | --lt-*) |
| 85 | $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 |
| 86 | exit 1 |
| 87 | ;; |
| 88 | esac |
| 89 | done |
| 90 | |
| 91 | # Print the debug banner immediately: |
| 92 | if test -n "$lt_option_debug"; then |
| 93 | echo "sndfile-play:sndfile-play:${LINENO}: libtool wrapper (GNU libtool) 2.4 Debian-2.4-2" 1>&2 |
| 94 | fi |
| 95 | } |
| 96 | |
| 97 | # Used when --lt-debug. Prints its arguments to stdout |
| 98 | # (redirection is the responsibility of the caller) |
| 99 | func_lt_dump_args () |
| 100 | { |
| 101 | lt_dump_args_N=1; |
| 102 | for lt_arg |
| 103 | do |
| 104 | $ECHO "sndfile-play:sndfile-play:${LINENO}: newargv[$lt_dump_args_N]: $lt_arg" |
| 105 | lt_dump_args_N=`expr $lt_dump_args_N + 1` |
| 106 | done |
| 107 | } |
| 108 | |
| 109 | # Core function for launching the target application |
| 110 | func_exec_program_core () |
| 111 | { |
| 112 | |
| 113 | if test -n "$lt_option_debug"; then |
| 114 | $ECHO "sndfile-play:sndfile-play:${LINENO}: newargv[0]: $progdir/$program" 1>&2 |
| 115 | func_lt_dump_args ${1+"$@"} 1>&2 |
| 116 | fi |
| 117 | exec "$progdir/$program" ${1+"$@"} |
| 118 | |
| 119 | $ECHO "$0: cannot exec $program $*" 1>&2 |
| 120 | exit 1 |
| 121 | } |
| 122 | |
| 123 | # A function to encapsulate launching the target application |
| 124 | # Strips options in the --lt-* namespace from $@ and |
| 125 | # launches target application with the remaining arguments. |
| 126 | func_exec_program () |
| 127 | { |
| 128 | for lt_wr_arg |
| 129 | do |
| 130 | case $lt_wr_arg in |
| 131 | --lt-*) ;; |
| 132 | *) set x "$@" "$lt_wr_arg"; shift;; |
| 133 | esac |
| 134 | shift |
| 135 | done |
| 136 | func_exec_program_core ${1+"$@"} |
| 137 | } |
| 138 | |
| 139 | # Parse options |
| 140 | func_parse_lt_options "$0" ${1+"$@"} |
| 141 | |
| 142 | # Find the directory that this script lives in. |
| 143 | thisdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` |
| 144 | test "x$thisdir" = "x$file" && thisdir=. |
| 145 | |
| 146 | # Follow symbolic links until we get to the real thisdir. |
| 147 | file=`ls -ld "$file" | /usr/bin/sed -n 's/.*-> //p'` |
| 148 | while test -n "$file"; do |
| 149 | destdir=`$ECHO "$file" | /usr/bin/sed 's%/[^/]*$%%'` |
| 150 | |
| 151 | # If there was a directory component, then change thisdir. |
| 152 | if test "x$destdir" != "x$file"; then |
| 153 | case "$destdir" in |
| 154 | [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; |
| 155 | *) thisdir="$thisdir/$destdir" ;; |
| 156 | esac |
| 157 | fi |
| 158 | |
| 159 | file=`$ECHO "$file" | /usr/bin/sed 's%^.*/%%'` |
| 160 | file=`ls -ld "$thisdir/$file" | /usr/bin/sed -n 's/.*-> //p'` |
| 161 | done |
| 162 | |
| 163 | # Usually 'no', except on cygwin/mingw when embedded into |
| 164 | # the cwrapper. |
| 165 | WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no |
| 166 | if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then |
| 167 | # special case for '.' |
| 168 | if test "$thisdir" = "."; then |
| 169 | thisdir=`pwd` |
| 170 | fi |
| 171 | # remove .libs from thisdir |
| 172 | case "$thisdir" in |
| 173 | *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /usr/bin/sed 's%[\\/][^\\/]*$%%'` ;; |
| 174 | .libs ) thisdir=. ;; |
| 175 | esac |
| 176 | fi |
| 177 | |
| 178 | # Try to get the absolute directory name. |
| 179 | absdir=`cd "$thisdir" && pwd` |
| 180 | test -n "$absdir" && thisdir="$absdir" |
| 181 | |
| 182 | program=lt-'sndfile-play' |
| 183 | progdir="$thisdir/.libs" |
| 184 | |
| 185 | if test ! -f "$progdir/$program" || |
| 186 | { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /usr/bin/sed 1q`; \ |
| 187 | test "X$file" != "X$progdir/$program"; }; then |
| 188 | |
| 189 | file="$$-$program" |
| 190 | |
| 191 | if test ! -d "$progdir"; then |
| 192 | mkdir "$progdir" |
| 193 | else |
| 194 | rm -f "$progdir/$file" |
| 195 | fi |
| 196 | |
| 197 | # relink executable if necessary |
| 198 | if test -n "$relink_command"; then |
| 199 | if relink_command_output=`eval $relink_command 2>&1`; then : |
| 200 | else |
| 201 | printf %s\n "$relink_command_output" >&2 |
| 202 | rm -f "$progdir/$file" |
| 203 | exit 1 |
| 204 | fi |
| 205 | fi |
| 206 | |
| 207 | mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null || |
| 208 | { rm -f "$progdir/$program"; |
| 209 | mv -f "$progdir/$file" "$progdir/$program"; } |
| 210 | rm -f "$progdir/$file" |
| 211 | fi |
| 212 | |
| 213 | if test -f "$progdir/$program"; then |
| 214 | if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then |
| 215 | # Run the actual program with our arguments. |
| 216 | func_exec_program ${1+"$@"} |
| 217 | fi |
| 218 | else |
| 219 | # The program doesn't exist. |
| 220 | $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2 |
| 221 | $ECHO "This script is just a wrapper for $program." 1>&2 |
| 222 | $ECHO "See the libtool documentation for more information." 1>&2 |
| 223 | exit 1 |
| 224 | fi |
| 225 | fi |