jjako | ff9985c | 2004-01-16 11:05:22 +0000 | [diff] [blame] | 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 |
| 3 | dnl |
| 4 | AC_DEFUN([adl_FUNC_GETOPT_LONG], |
| 5 | [AC_PREREQ(2.49)dnl |
| 6 | # clean out junk possibly left behind by a previous configuration |
| 7 | rm -f lib/getopt.h |
| 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 |
| 14 | AC_LIBOBJ(getopt) |
| 15 | AC_LIBOBJ(getopt1) |
Emmanuel Bretelle | 2a10368 | 2010-09-07 17:01:20 +0200 | [diff] [blame] | 16 | AC_CONFIG_LINKS([lib/getopt.h:lib/gnugetopt.h])])])]) |
| 17 | |