|
1 | 1 | dnl -*- Autoconf -*- |
2 | 2 | dnl |
3 | 3 | dnl Copyright © 2009-2014 Inria. All rights reserved. |
4 | | -dnl Copyright (c) 2009-2012 Université Bordeaux 1 |
| 4 | +dnl Copyright (c) 2009-2012, 2015 Université Bordeaux 1 |
5 | 5 | dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana |
6 | 6 | dnl University Research and Technology |
7 | 7 | dnl Corporation. All rights reserved. |
@@ -533,15 +533,13 @@ EOF]) |
533 | 533 | AC_MSG_RESULT([yes])], |
534 | 534 | [AC_MSG_RESULT([no])]) |
535 | 535 |
|
536 | | - AC_MSG_CHECKING([for working _syscall3]) |
| 536 | + AC_MSG_CHECKING([for working syscall]) |
537 | 537 | AC_LINK_IFELSE([ |
538 | 538 | AC_LANG_PROGRAM([[ |
539 | | - #include <linux/unistd.h> |
540 | | - #include <errno.h> |
541 | | - #define __NR_hwloc_test 123 |
542 | | - _syscall3(int, hwloc_test, int, param1, int, param2, int, param3); |
543 | | - ]], [[ hwloc_test(1, 2, 3); ]])], |
544 | | - [AC_DEFINE([HWLOC_HAVE__SYSCALL3], [1], [Define to 1 if the _syscall3 macro works]) |
| 539 | + #include <unistd.h> |
| 540 | + #include <sys/syscall.h> |
| 541 | + ]], [[syscall(1, 2, 3);]])], |
| 542 | + [AC_DEFINE([HWLOC_HAVE_SYSCALL], [1], [Define to 1 if function `syscall' is available]) |
545 | 543 | AC_MSG_RESULT([yes])], |
546 | 544 | [AC_MSG_RESULT([no])]) |
547 | 545 |
|
@@ -929,8 +927,11 @@ EOF]) |
929 | 927 | # lstopo needs more |
930 | 928 | AC_CHECK_HEADERS([X11/Xutil.h], |
931 | 929 | [AC_CHECK_HEADERS([X11/keysym.h], |
932 | | - [AC_DEFINE([HWLOC_HAVE_X11_KEYSYM], [1], [Define to 1 if X11 headers including Xutil.h and keysym.h are available.])]) |
933 | | - AC_SUBST([HWLOC_X11_LIBS], ["-lX11"]) |
| 930 | + [AC_DEFINE([HWLOC_HAVE_X11_KEYSYM], [1], [Define to 1 if X11 headers including Xutil.h and keysym.h are available.]) |
| 931 | + HWLOC_X11_CPPFLAGS="$X_CFLAGS" |
| 932 | + AC_SUBST([HWLOC_X11_CPPFLAGS]) |
| 933 | + HWLOC_X11_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" |
| 934 | + AC_SUBST([HWLOC_X11_LIBS])]) |
934 | 935 | ], [], [#include <X11/Xlib.h>]) |
935 | 936 | ]) |
936 | 937 | ]) |
|
0 commit comments