Commit Graph

4 Commits

Author SHA1 Message Date
Mike Frysinger
584ba2d31d Fix off_t/rlim_t size checks when cross-compiling
The current off_t/rlim_t size checks (wrt size of long long) use AC_RUN
which obviously doesn't work when cross-compiling.  While we don't hit
any configure errors, the fall back code is pretty dumb (which is to say
there isn't any).  Considering the code in question though, we can use
some fun compiler tricks with sizeof and array lengths to turn it into
a pure build test and avoid the RUN issue completely.

* m4/long_long.m4 (AC_OFF_T_IS_LONG_LONG, AC_RLIM_T_IS_LONG_LONG):
Convert from AC_RUN_IFELSE to AC_COMPILE_IFELSE.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-15 15:36:00 +00:00
Mike Frysinger
6d12afdac4 Fix long long little endian detection when cross-compiling
The long long endian detection code does an AC_TRY_RUN() and since that
doesn't work when cross-compiling, it sets a fallback value.  However,
rather than do any sort of default endian detection, the code simply
sets it to "no".  This probably breaks most little endian systems out
there when cross-compiling for them.  It certainly breaks Blackfin
systems.  So use the common endian detection code provided by autoconf
and key off of that when cross-compiling.

* configure.ac: Call AC_C_BIGENDIAN.
* m4/long_long.m4 (AC_LITTLE_ENDIAN_LONG_LONG): Set cross-compiling
logic based on ac_cv_c_bigendian.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-15 15:36:00 +00:00
918e49bac7 Import warnings.m4 from gnulib
* m4/warnings.m4: Replace with warnings.m4 from gnulib.
* configure.ac: Use gl_WARN_ADD from new warnings.m4.
* Makefile.am (AM_CFLAGS): Update for new warnings.m4.
2010-09-09 23:20:25 +00:00
916adeda63 Split acinclude.m4
* Makefile.am (ACLOCAL_AMFLAGS): Add "-I m4".
* acinclude.m4: Remove.
* m4/includedir.m4: New file, with definition of AC_INCLUDEDIR from
acinclude.m4.
* m4/long_long.m4: New file, with definitions of AC_OFF_T_IS_LONG_LONG,
AC_RLIM_T_IS_LONG_LONG and AC_LITTLE_ENDIAN_LONG_LONG from acinclude.m4.
* m4/procfs.m4: New file, with definitions of AC_MP_PROCFS,
AC_POLLABLE_PROCFS and AC_STRUCT_PR_SYSCALL from acinclude.m4.
* m4/stat.m4: New file, with definition of AC_STAT64 from acinclude.m4.
* m4/statfs.m4: New file, with definition of AC_STATFS64 from
acinclude.m4.
* m4/warnings.m4: New file, with definition of AC_WARNFLAGS from
acinclude.m4.
2010-09-09 23:20:24 +00:00