xref: /netbsd-src/external/bsd/am-utils/dist/m4/macros/opt_ldflags.m4 (revision a53f50b9b44dc9467ccc9c464999b1d1c509cb0c)
1dnl ######################################################################
2dnl Initial settings for LDFLAGS (-L options)
3dnl NOTE: this is for configuration as well as compilations!
4AC_DEFUN([AMU_OPT_LDFLAGS],
5[AC_MSG_CHECKING(for configuration/compilation (-L) library flags)
6AC_ARG_ENABLE(ldflags,
7AC_HELP_STRING([--enable-ldflags=ARG],
8		[configure/compile with ARG (-L) library flags]),
9[
10if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then
11  AC_MSG_ERROR(ldflags must be supplied if option is used)
12fi
13# use supplied options
14LDFLAGS="$LDFLAGS $enableval"
15export LDFLAGS
16AC_MSG_RESULT($enableval)
17], [
18  # default is to have no additional flags
19  AC_MSG_RESULT(none)
20])
21])
22dnl ======================================================================
23