1 dnl Available from the GNU Autoconf Macro Archive at:
2 dnl http://www.gnu.org/software/ac-archive/htmldoc/adl_func_getopt_long.html
4 AC_DEFUN([adl_FUNC_GETOPT_LONG],
6 # clean out junk possibly left behind by a previous configuration
8 # Check for getopt_long support
9 AC_CHECK_HEADERS([getopt.h])
10 AC_CHECK_FUNCS([getopt_long],,
11 [# FreeBSD has a gnugetopt library for this
12 AC_CHECK_LIB([gnugetopt],[getopt_long],[AC_DEFINE([HAVE_GETOPT_LONG])],
13 [# use the GNU replacement
16 AC_CONFIG_LINKS([ggsn/getopt.h:ggsn/gnugetopt.h])
17 AC_CONFIG_LINKS([sgsnemu/getopt.h:sgsnemu/gnugetopt.h])])])])