Skip to content

Commit

Permalink
fix mingw x-compilation. fixes #2
Browse files Browse the repository at this point in the history
modified patch from lukemalcolm & libltc
  • Loading branch information
x42 committed Mar 27, 2015
1 parent b55b923 commit 0eb6e85
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions configure.ac
Expand Up @@ -41,16 +41,23 @@ dnl *** misc complier/linker flags ***
LIBTIMECODE_CFLAGS="-Wall"
LIBTIMECODE_LDFLAGS="-export-symbols-regex '^(timecode_).*'"

AC_MSG_CHECKING([if -Wl,--as-needed works])
LFDLAGS_save=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,--as-needed"
AC_TRY_LINK([], [],
[
AC_MSG_RESULT([yes])
LIBTIMECODE_LDFLAGS="$LIBTIMECODE_LDFLAGS -Wl,--as-needed"
],
[AC_MSG_RESULT([no])])
LDFLAGS=$LDFLAGS_save
case $target_os in
*mingw32*|*win*)
LDFLAGS="-no-undefined"
;;
*)
AC_MSG_CHECKING([if -Wl,--as-needed works])
LDFLAGS_save=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,--as-needed"
AC_TRY_LINK([], [],
[
AC_MSG_RESULT([yes])
LIBTIMECODE_LDFLAGS="$LIBTIMECODE_LDFLAGS -Wl,--as-needed"
],
[AC_MSG_RESULT([no])])
LDFLAGS=$LDFLAGS_save
;;
esac

dnl *** check for dependencies ***
AC_CHECK_HEADERS(stdio.h stdlib.h string.h unistd.h sys/types.h stdint.h)
Expand Down

0 comments on commit 0eb6e85

Please sign in to comment.