diff options
author | Havoc Pennington <hp@redhat.com> | 2005-01-28 03:06:56 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2005-01-28 03:06:56 +0000 |
commit | 3ed9db546e1143bc9aa2d83a6f423fdd81227352 (patch) | |
tree | 6ba7a785ddeff02224072cc51faf108482dfb0c7 /configure.in | |
parent | 4506b6594b4a86557fad7850f56b5fdabd3108de (diff) |
2005-01-27 Havoc Pennington <hp@redhat.com>
* dbus/dbus-arch-deps.h.in: add 16/32-bit types
* configure.in: find the right type for 16 and 32 bit ints as well
as 64
* dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
the 16-bit types so people don't have to stuff them in 32-bit or
byte arrays.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 95ab6d1e..71efb27f 100644 --- a/configure.in +++ b/configure.in @@ -369,6 +369,53 @@ AC_SUBST(DBUS_INT64_CONSTANT) AC_SUBST(DBUS_UINT64_CONSTANT) AC_SUBST(DBUS_HAVE_INT64) +### see what 32-bit int is called +AC_MSG_CHECKING([32-bit integer type]) + +case 4 in +$ac_cv_sizeof_short) + dbusint32=int + ;; +$ac_cv_sizeof_int) + dbusint32=int + ;; +$ac_cv_sizeof_long) + dbusint32=long + ;; +esac + +if test -z "$dbusint32" ; then + DBUS_INT32_TYPE="no_int32_type_detected" + AC_MSG_ERROR([No 32-bit integer type found]) +else + DBUS_INT32_TYPE="$dbusint32" + AC_MSG_RESULT($DBUS_INT32_TYPE) +fi + +AC_SUBST(DBUS_INT32_TYPE) + +### see what 16-bit int is called +AC_MSG_CHECKING([16-bit integer type]) + +case 2 in +$ac_cv_sizeof_short) + dbusint16=short + ;; +$ac_cv_sizeof_int) + dbusint16=int + ;; +esac + +if test -z "$dbusint16" ; then + DBUS_INT16_TYPE="no_int16_type_detected" + AC_MSG_ERROR([No 16-bit integer type found]) +else + DBUS_INT16_TYPE="$dbusint16" + AC_MSG_RESULT($DBUS_INT16_TYPE) +fi + +AC_SUBST(DBUS_INT16_TYPE) + ## byte order AC_C_BIGENDIAN @@ -1194,6 +1241,8 @@ echo " cppflags: ${CPPFLAGS} cxxflags: ${CXXFLAGS} 64-bit int: ${DBUS_INT64_TYPE} + 32-bit int: ${DBUS_INT32_TYPE} + 16-bit int: ${DBUS_INT16_TYPE} Doxygen: ${DOXYGEN} xmlto: ${XMLTO}" |