check_transport 7.5 KB

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