1#! /bin/sh
2
3# testoutline - temporary wrapper script for .libs/testoutline
4# Generated by ltmain.sh - GNU libtool 1.5.16 (1.1220.2.235 2005/04/25 18:13:26)
5#
6# The testoutline 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.
14Xsed='/bin/sed -e 1s/^X//'
15sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
16
17# The HP-UX ksh and POSIX shell print the target directory to stdout
18# if CDPATH is set.
19(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20
21relink_command="(cd /home/facundo/spacejunk/main/src; { 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/kerberos/bin:/sbin:/usr/sbin:/usr/java/jdk1.5.0_07/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/facundo/bin\"; export PATH; g++ -o \$progdir/\$file testoutline-outline.o testoutline-resourcemanager.o testoutline-music.o testoutline-graphic.o testoutline-soundfx.o testoutline-fontrenderer.o testoutline-parsercombinators.o testoutline-filecoding.o testoutline-debugmsg.o testoutline-clipping.o testoutline-physfsrwops.o -Wl,-rpath -Wl,/usr/lib  -L/usr/lib -lguichan_sdl -lguichan -lSGE /usr/lib/libSDL_mixer.so -L/usr/local/lib /usr/lib/libSDL_image.so /usr/lib/libjpeg.so -lpng /usr/lib/libiconv.so /usr/lib/libphysfs.so -lz ./.libs/libgem_uta.so ./.libs/libsfont.so /usr/lib/libSDL.so -lm -ldl -lpthread -Wl,--rpath -Wl,/home/facundo/spacejunk/main/src/.libs)"
22
23# This environment variable determines our operation mode.
24if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
25  # install mode needs the following variable:
26  notinst_deplibs=' libgem_uta.la libsfont.la'
27else
28  # When we are sourced in execute mode, $file and $echo are already set.
29  if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
30    echo="echo"
31    file="$0"
32    # Make sure echo works.
33    if test "X$1" = X--no-reexec; then
34      # Discard the --no-reexec flag, and continue.
35      shift
36    elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
37      # Yippee, $echo works!
38      :
39    else
40      # Restart under the correct shell, and then maybe $echo will work.
41      exec /bin/sh "$0" --no-reexec ${1+"$@"}
42    fi
43  fi
44
45  # Find the directory that this script lives in.
46  thisdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
47  test "x$thisdir" = "x$file" && thisdir=.
48
49  # Follow symbolic links until we get to the real thisdir.
50  file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'`
51  while test -n "$file"; do
52    destdir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
53
54    # If there was a directory component, then change thisdir.
55    if test "x$destdir" != "x$file"; then
56      case "$destdir" in
57      [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;;
58      *) thisdir="$thisdir/$destdir" ;;
59      esac
60    fi
61
62    file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
63    file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'`
64  done
65
66  # Try to get the absolute directory name.
67  absdir=`cd "$thisdir" && pwd`
68  test -n "$absdir" && thisdir="$absdir"
69
70  program=lt-'testoutline'
71  progdir="$thisdir/.libs"
72
73  if test ! -f "$progdir/$program" || \
74     { file=`ls -1dt "$progdir/$program" "$progdir/../$program" 2>/dev/null | /bin/sed 1q`; \
75       test "X$file" != "X$progdir/$program"; }; then
76
77    file="$$-$program"
78
79    if test ! -d "$progdir"; then
80      mkdir "$progdir"
81    else
82      rm -f "$progdir/$file"
83    fi
84
85    # relink executable if necessary
86    if test -n "$relink_command"; then
87      if relink_command_output=`eval $relink_command 2>&1`; then :
88      else
89	echo "$relink_command_output" >&2
90	rm -f "$progdir/$file"
91	exit 1
92      fi
93    fi
94
95    mv -f "$progdir/$file" "$progdir/$program" 2>/dev/null ||
96    { rm -f "$progdir/$program";
97      mv -f "$progdir/$file" "$progdir/$program"; }
98    rm -f "$progdir/$file"
99  fi
100
101  if test -f "$progdir/$program"; then
102    if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
103      # Run the actual program with our arguments.
104
105      exec valgrind --tool=memcheck --gen-suppressions=yes  --db-attach=yes --suppressions=../spacejunk.supp --leak-check=full $progdir/$program ${1+"$@"}
106
107      $echo "$0: cannot exec $program ${1+"$@"}"
108      exit 1
109    fi
110  else
111    # The program doesn't exist.
112    $echo "$0: error: $progdir/$program does not exist" 1>&2
113    $echo "This script is just a wrapper for $program." 1>&2
114    echo "See the libtool documentation for more information." 1>&2
115    exit 1
116  fi
117fi
118