aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-09-03 18:14:00 +0000
committerGuy Harris <guy@alum.mit.edu>2004-09-03 18:14:00 +0000
commitdfad2b94f5fa40db86bd11e475c310751efafe69 (patch)
tree52e7356882f6648b61bf937b258a6ebcffc54e65 /configure.in
parent4e3b6fb31568d2a767c4f977b8954e124caec30c (diff)
Some UN*Xes don't have any "strtou*" routine to convert a string to a
64-bit integer; use "g_ascii_strtoull()", and, in the configure script, check whether it's available in GLib (it's not in GLib 1.2[.x]) and, if not, supply the GLib 2.4.5 version of the routine. For G_MAXUINT32 and G_MAXUINT64, put a "U" at the end of the constant to explicitly flag it as unsigned. svn path=/trunk/; revision=11889
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in34
1 files changed, 16 insertions, 18 deletions
diff --git a/configure.in b/configure.in
index 88a14ba9fb..c78a8dbd43 100644
--- a/configure.in
+++ b/configure.in
@@ -468,24 +468,6 @@ else
])
fi
-AC_CHECK_FUNC(strtoull,,
- [
- #
- # No strtoull - do we have strtouq?
- #
- AC_CHECK_FUNC(strtouq,
- [
- #
- # Yes - define strtoull to be strtouq.
- #
- AC_DEFINE(strtoull, strtouq,
- [Define as a function that behaves like strtoull])
- ],
- [
- AC_MSG_ERROR([This platform has neither strtoull nor strtouq.])
- ])
- ])
-
AC_SUBST(ethereal_bin)
AC_SUBST(ethereal_man)
@@ -1009,6 +991,22 @@ fi
AC_SUBST(MKSTEMP_C)
AC_SUBST(MKSTEMP_O)
+ac_save_LIBS="$LIBS"
+LIBS="$GLIB_LIBS $LIBS"
+G_ASCII_STRTOULL_C=""
+G_ASCII_STRTOULL_O=""
+AC_CHECK_FUNC(g_ascii_strtoull, G_ASCII_STRTOULL_O="",
+ [G_ASCII_STRTOULL_O="g_ascii_strtoull.o"
+ AC_DEFINE(NEED_G_ASCII_STRTOULL_H, 1, [Define if g_ascii_strtoull.h needs to be included])
+])
+LIBS="$ac_save_LIBS"
+if test "$ac_cv_func_g_ascii_strtoull" = no ; then
+ G_ASCII_STRTOULL_C="g_ascii_strtoull.c"
+ G_ASCII_STRTOULL_O="g_ascii_strtoull.o"
+fi
+AC_SUBST(G_ASCII_STRTOULL_C)
+AC_SUBST(G_ASCII_STRTOULL_O)
+
AC_CHECK_FUNC(inet_aton, INET_ATON_O="",
INET_ATON_O="inet_aton.lo")
if test "$ac_cv_func_inet_aton" = no ; then