29 |
AC_SUBST([GETOPT_H]) |
AC_SUBST([GETOPT_H]) |
30 |
|
|
31 |
AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h], [AC_INCLUDES_DEFAULT]) |
AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h], [AC_INCLUDES_DEFAULT]) |
32 |
AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h]) |
|
33 |
|
if test -z "$GETOPT_H"; then |
34 |
|
AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h]) |
35 |
|
fi |
36 |
|
|
37 |
dnl BSD getopt_log uses an incompatible method to reset option processing, |
dnl BSD getopt_log uses an incompatible method to reset option processing, |
38 |
dnl and (as of 2004-10-15) mishandles optional option-arguments. |
dnl and (as of 2004-10-15) mishandles optional option-arguments. |
39 |
AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>]) |
if test -z "$GETOPT_H"; then |
40 |
|
AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>]) |
41 |
|
fi |
42 |
|
|
43 |
AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], |
dnl Solaris 10 getopt doesn't handle `+' as a leading character in an |
44 |
[Define to rpl_ if the getopt replacement function should be used.]) |
dnl option string (as of 2005-05-05). |
45 |
|
if test -z "$GETOPT_H"; then |
46 |
|
AC_CHECK_DECL([getopt_clip], [GETOPT_H=getopt.h], [], [#include <getopt.h>]) |
47 |
|
fi |
48 |
|
|
49 |
])# m4_ERROR |
if test -n "$GETOPT_H"; then |
50 |
|
AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], |
51 |
|
[Define to rpl_ if the getopt replacement function should be used.]) |
52 |
|
fi |
53 |
|
])# m4_GETOPT |