| 1 | # AC_LTTV_SETUP_FOR_TARGET |
| 2 | # ---------------- |
| 3 | # Check for utils function |
| 4 | ### [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 5 | AC_DEFUN([AC_LTTV_SETUP_FOR_TARGET], |
| 6 | [ UTIL_LIBS="" |
| 7 | case $host in |
| 8 | *-*-cygwin*) |
| 9 | AC_SUBST(SHARED_FLAGS,"-module -no-undefined -XLinker --export-all-symbols") |
| 10 | AC_SUBST(PLUGIN_FLAGS,"-module -no-undefined -avoid-version") |
| 11 | AC_CHECK_LIB([util], [forkpty], UTIL_LIBS="-lutil", AC_MSG_ERROR([libutil is required in order to compile LinuxTraceToolkit])) |
| 12 | cygwin=true |
| 13 | ;; |
| 14 | |
| 15 | *-*-mingw*) |
| 16 | # mingw32 doesn't have libutil |
| 17 | AC_SUBST(SHARED_FLAGS,"-module -no-undefined -avoid-version -XLinker --export-all-symbols") |
| 18 | AC_SUBST(PLUGIN_FLAGS,"-module -no-undefined -avoid-version") |
| 19 | mingw=true |
| 20 | ;; |
| 21 | *) |
| 22 | AC_SUBST(SHARED_FLAGS,"-module") |
| 23 | AC_SUBST(PLUGIN_FLAGS,"-module -avoid-version") |
| 24 | AC_CHECK_LIB([util], [forkpty], UTIL_LIBS="-lutil", AC_MSG_ERROR([libutil is required in order to compile LinuxTraceToolkit])) |
| 25 | linux=true |
| 26 | ;; |
| 27 | esac |
| 28 | AM_CONDITIONAL(LTTV_MINGW, test x$mingw = xtrue) |
| 29 | AM_CONDITIONAL(LTTV_CYGWIN, test x$cygwin = xtrue) |
| 30 | AM_CONDITIONAL(LTTV_LINUX, test x$linux = xtrue) |
| 31 | AM_CONDITIONAL(USE_UTIL_LIBS, test "$UTIL_LIBS" != "") |
| 32 | ])# AC_LTTV_SETUP_FOR_TARGET |