flmsg/m4/funcs.m4
David Freese cddab9240b Fix LDFLAGS
* Link with all needed libraries. Required when linking with
      --no-add-needed or the experimental gold linker, which has this
      behaviour by default.
    * On X11 platforms we should explicitly link  with libX11 because we
      use XCreatePixmap via the FLTK fl_create_offscreen macro
2011-03-11 05:49:28 -06:00

15 lines
497 B
Text

# args: function, search-libs, other-libraries
AC_DEFUN([AC_FLMSG_SEARCH_LIBS], [
m4_define([FUNC_NAME_UC], m4_translit([$1], [a-z], [A-Z]))
LIBS_search_libs_save="$LIBS"
LIBS=""
AC_SEARCH_LIBS($1, $2, [ac_cv_have_func_[]$1=1], [ac_cv_have_func_[]$1=0], $3)
if test "x$LIBS" != "x"; then
echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS"
fi
AC_DEFINE_UNQUOTED([HAVE_]FUNC_NAME_UC, $ac_cv_have_func_[]$1, [Define to 1 if we have $1])
LIBS="$LIBS_search_libs_save"
])