+2009-02-13 13:45 Christos Zoulas <christos@zoulas.com>
+
+ * look for struct option to determine if getopt.h is usable for IRIX.
+
+ * sanitize cdf document strings
+
2009-02-04 13:25 Christos Zoulas <christos@zoulas.com>
* fix OS/2 warnings.
+#ACLOCAL_AMFLAGS = -I m4
+
EXTRA_DIST = MAINT
SUBDIRS = src magic tests doc python
if test "$ac_cv_struct_tm_zone" = yes; then
AC_DEFINE(HAVE_TM_ZONE,1,[HAVE_TM_ZONE])
fi
+
AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
[AC_TRY_LINK(
changequote(<<, >>)dnl
if test "$ac_cv_struct_tm_isdst" = yes; then
AC_DEFINE(HAVE_TM_ISDST,1,[HAVE_TM_ISDST])
fi
+
AC_CACHE_CHECK(for daylight, ac_cv_var_daylight,
[AC_TRY_LINK(
changequote(<<, >>)dnl
AC_DEFINE(HAVE_DAYLIGHT,1,[HAVE_DAYLIGHT])
fi
])
+
+AC_DEFUN([AC_STRUCT_OPTION_GETOPT_H],
+[AC_CACHE_CHECK([for struct option in getopt], ac_cv_struct_option_getopt_h,
+[AC_TRY_COMPILE([#include <getopt.h>], [struct option op; op.name;],
+ ac_cv_struct_option_getopt_h=yes, ac_cv_struct_option_getopt_h=no)])
+if test "$ac_cv_struct_option_getopt_h" = yes; then
+ AC_DEFINE(HAVE_STRUCT_OPTION,1,[HAVE_STRUCT_OPTION])
+fi
+])
AC_INIT(file, 5.00, christos@astron.com)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
+#AC_CONFIG_MACRO_DIR([m4])
AC_MSG_CHECKING(for builtin ELF support)
AC_ARG_ENABLE(elf,
AC_FUNC_FSEEKO
AC_TYPE_MBSTATE_T
+AC_STRUCT_OPTION_GETOPT_H
+
AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t, int32_t, uint64_t, int64_t])
AC_CHECK_SIZEOF(long long)
AH_BOTTOM([
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: file.c,v 1.129 2008/12/03 18:05:18 christos Exp $")
+FILE_RCSID("@(#)$File: file.c,v 1.130 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
#include "magic.h"
#include <wchar.h>
#endif
-#ifdef HAVE_GETOPT_H
+#if defined(HAVE_GETOPT_H) && defined(HAVE_STRUCT_OPTION)
#include <getopt.h>
#else
#include "mygetopt.h"
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: getopt_long.c,v 1.4 2008/11/04 16:38:28 christos Exp $")
+FILE_RCSID("@(#)$File: getopt_long.c,v 1.5 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
#include <assert.h>
#define warnx printf
#endif
#include <errno.h>
-#ifdef HAVE_GETOPT_H
+#if defined(HAVE_GETOPT_H) && defined(HAVE_STRUCT_OPTION)
#include <getopt.h>
#else
#include "mygetopt.h"