Fix the AC_TRY_RUN for sys/linker.h which had no hope due to lacking a

main() to instead use a nice AC_CHECK_HEADERS that works. Also, fix the
    nearby SYSV IPC check which was lacking an argument and giving bogus
    results (it's "AC_TRY_LINK(includes, main, yes, no)").
This commit is contained in:
Eric Anholt 2005-12-30 12:05:47 +00:00
parent eef16c36ad
commit e6dab3d7c4
2 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,11 @@
2005-12-30 Eric Anholt <anholt@FreeBSD.org>
* configure.ac:
Fix the AC_TRY_RUN for sys/linker.h which had no hope due to lacking a
main() to instead use a nice AC_CHECK_HEADERS that works. Also, fix
the nearby SYSV IPC check which was lacking an argument and giving
bogus results (it's "AC_TRY_LINK(includes, main, yes, no)").
2005-12-29 Eric Anholt <anholt@FreeBSD.org>
* include/dix-config.h.in:

View File

@ -132,20 +132,17 @@ if test "x$ac_cv_mtrr_h" = xyes; then
fi
dnl FreeBSD kldload support (sys/linker.h)
AC_CACHE_CHECK([for sys/linker.h],
ac_cv_sys_linker_h,
[AC_TRY_RUN([
#include <sys/param.h>
#include <sys/linker.h>
],
AC_CHECK_HEADERS([sys/linker.h],
[ac_cv_sys_linker_h=yes],
[ac_cv_sys_linker_h=no])])
[ac_cv_sys_linker_h=no],
[#include <sys/param.h>])
AM_CONDITIONAL(FREEBSD_KLDLOAD, [test "x$ac_cv_sys_linker_h" = xyes])
AC_CACHE_CHECK([for SYSV IPC],
ac_cv_sysv_ipc,
[AC_TRY_LINK([
#include <sys/shm.h>
],[
int main () {
int id;
id = shmget(IPC_PRIVATE, 512, SHM_W | SHM_R);