aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--acinclude.m43
-rw-r--r--configure.in122
2 files changed, 60 insertions, 65 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 035c683b56..0c425681a4 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -106,12 +106,13 @@ AC_DEFUN([AC_ETHEREAL_CHECK_64BIT_FORMAT],
# ifdef HAVE_INTTYPES_H
#include <inttypes.h>
# endif
+ #include <glib.h>
#include <stdio.h>
#include <sys/types.h>
main()
{
- u_int64_t t = 1;
+ guint64 t = 1;
char strbuf[16+1];
sprintf(strbuf, "%016$1x", t << 32);
if (strcmp(strbuf, "0000000100000000") == 0)
diff --git a/configure.in b/configure.in
index 5e869c5e55..e5268c29d4 100644
--- a/configure.in
+++ b/configure.in
@@ -289,70 +289,6 @@ if test "$HAVE_GNU_SED" = no ; then
esac
fi
-#
-# We can't just check for <inttypes.h> - some systems have one that
-# doesn't define all the PRI[doxu]64 macros.
-#
-AC_CHECK_TYPE(
- uint64_t,
- ac_ethereal_uint64_t_type=uint64_t,
- ac_ethereal_uint64_t_type=u_int_64_t
-)
-
-AC_CHECK_HEADERS(inttypes.h,
- [
- #
- # OK, we have inttypes.h, but does it define those macros?
- #
- AC_MSG_CHECKING([[whether inttypes.h defines the PRI[doxu]64 macros]])
- AC_COMPILE_IFELSE(
- [
- AC_LANG_SOURCE(
- [[
- #include <inttypes.h>
- #include <stdio.h>
- #include <sys/types.h>
-
- main()
- {
- printf("%" PRId64 "\n", ($ac_ethereal_uint64_t_type)1);
- printf("%" PRIo64 "\n", ($ac_ethereal_uint64_t_type)1);
- printf("%" PRIx64 "\n", ($ac_ethereal_uint64_t_type)1);
- printf("%" PRIu64 "\n", ($ac_ethereal_uint64_t_type)1);
- }
- ]])
- ],
- [
- AC_MSG_RESULT(yes)
- ac_ethereal_inttypes_h_defines_formats=yes
- ],
- [
- AC_MSG_RESULT(no)
- ac_ethereal_inttypes_h_defines_formats=no
- ])
- ],
- [
- #
- # We don't have inttypes.h, so it obviously can't define those
- # macros.
- #
- ac_ethereal_inttypes_h_defines_formats=no
- ])
-if test "$ac_ethereal_inttypes_h_defines_formats" = yes; then
- AC_DEFINE(INTTYPES_H_DEFINES_FORMATS,,[Define if <inttypes.h> defines PRI[doxu]64 macros])
-else
- AC_ETHEREAL_CHECK_64BIT_FORMAT(ll,
- [
- AC_ETHEREAL_CHECK_64BIT_FORMAT(L,
- [
- AC_ETHEREAL_CHECK_64BIT_FORMAT(q,
- [
- AC_MSG_ERROR([neither %llx nor %Lx nor %qx worked on a 64-bit integer])
- ])
- ])
- ])
-fi
-
# Enable/disable tethereal
AC_ARG_ENABLE(ethereal,
@@ -473,6 +409,64 @@ else
have_plugins=no
fi
+#
+# We can't just check for <inttypes.h> - some systems have one that
+# doesn't define all the PRI[doxu]64 macros.
+#
+AC_CHECK_HEADERS(inttypes.h,
+ [
+ #
+ # OK, we have inttypes.h, but does it define those macros?
+ #
+ AC_MSG_CHECKING([[whether inttypes.h defines the PRI[doxu]64 macros]])
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_SOURCE(
+ [[
+ #include <inttypes.h>
+ #include <glib.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+
+ main()
+ {
+ printf("%" PRId64 "\n", (gint64)1);
+ printf("%" PRIo64 "\n", (guint64)1);
+ printf("%" PRIx64 "\n", (guint64)1);
+ printf("%" PRIu64 "\n", (guint64)1);
+ }
+ ]])
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ ac_ethereal_inttypes_h_defines_formats=yes
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ac_ethereal_inttypes_h_defines_formats=no
+ ])
+ ],
+ [
+ #
+ # We don't have inttypes.h, so it obviously can't define those
+ # macros.
+ #
+ ac_ethereal_inttypes_h_defines_formats=no
+ ])
+if test "$ac_ethereal_inttypes_h_defines_formats" = yes; then
+ AC_DEFINE(INTTYPES_H_DEFINES_FORMATS,,[Define if <inttypes.h> defines PRI[doxu]64 macros])
+else
+ AC_ETHEREAL_CHECK_64BIT_FORMAT(ll,
+ [
+ AC_ETHEREAL_CHECK_64BIT_FORMAT(L,
+ [
+ AC_ETHEREAL_CHECK_64BIT_FORMAT(q,
+ [
+ AC_MSG_ERROR([neither %llx nor %Lx nor %qx worked on a 64-bit integer])
+ ])
+ ])
+ ])
+fi
AC_SUBST(ethereal_bin)
AC_SUBST(ethereal_man)