Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
75fd9d7f
Commit
75fd9d7f
authored
6 years ago
by
Peter W. Draper
Browse files
Options
Downloads
Patches
Plain Diff
Don't set NUMA_LIBS when we don't have NUMA
parent
bf65627d
No related branches found
No related tags found
1 merge request
!692
NUMA: make the check look for an external library
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configure.ac
+42
-37
42 additions, 37 deletions
configure.ac
with
42 additions
and
37 deletions
configure.ac
+
42
−
37
View file @
75fd9d7f
...
...
@@ -1016,34 +1016,39 @@ AC_ARG_WITH([numa],
)
if test "$ac_cv_func_pthread_setaffinity_np" = "yes" -a "x$with_numa" != "xno"; then
if test "x$with_numa" != "xyes" -a "x$with_numa" != "x"; then
NUMA_LIBS="-L$with_numa/lib -lnuma"
NUMA_INCS="-I$with_numa/include"
else
NUMA_LIBS="-lnuma"
NUMA_INCS=""
fi
if test "x$with_numa" != "xyes" -a "x$with_numa" != "x"; then
NUMA_LIBS="-L$with_numa/lib -lnuma"
NUMA_INCS="-I$with_numa/include"
else
NUMA_LIBS="-lnuma"
NUMA_INCS=""
fi
# Test for header file.
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $NUMA_INCS"
AC_CHECK_HEADER([numa.h])
CPPFLAGS="$old_CPPFLAGS"
if test "$ac_cv_header_numa_h" = "yes"; then
# If NUMA location is specified check if we have it.
if test "x$with_numa" != "xyes" -a "x$with_numa" != "x"; then
AC_CHECK_LIB([numa],[numa_available],
AC_DEFINE([HAVE_LIBNUMA],1,[The NUMA library appears to be present.]),
AC_MSG_ERROR(something is wrong with the NUMA library!), $NUMA_LIBS)
have_numa="yes"
else
AC_CHECK_LIB([numa],[numa_available],[have_numa="yes"],[have_numa="no"],$NUMA_LIBS)
if test "x$have_numa" != "xno"; then
AC_DEFINE([HAVE_LIBNUMA],1,[The NUMA library appears to be present.])
fi
fi
fi
# Test for header file.
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $NUMA_INCS"
AC_CHECK_HEADER([numa.h])
CPPFLAGS="$old_CPPFLAGS"
if test "$ac_cv_header_numa_h" = "yes"; then
# If NUMA location is specified check if we have it.
if test "x$with_numa" != "xyes" -a "x$with_numa" != "x"; then
AC_CHECK_LIB([numa],[numa_available],
AC_DEFINE([HAVE_LIBNUMA],1,[The NUMA library appears to be present.]),
AC_MSG_ERROR(something is wrong with the NUMA library!), $NUMA_LIBS)
have_numa="yes"
else
AC_CHECK_LIB([numa],[numa_available],[have_numa="yes"],[have_numa="no"],$NUMA_LIBS)
if test "x$have_numa" != "xno"; then
AC_DEFINE([HAVE_LIBNUMA],1,[The NUMA library appears to be present.])
fi
fi
fi
# We can live without this.
if test "$have_numa" = "no"; then
NUMA_LIBS=""
fi
fi
AC_SUBST([NUMA_LIBS])
...
...
@@ -1135,16 +1140,16 @@ fi
# Second part of the NUMA library checks. We now decide if we need to use
# -isystem to get around the strict-prototypes problem. Assumes isystem
# is available when strict-prototypes is.
if test "$
ac_cv_func_pthread_setaffinity_np" = "yes" -a "x$with
_numa" != "
x
no"; then
if test "x$with_numa" != "xyes" -a "x$with_numa" != "x"; then
case "$CFLAGS" in
*strict-prototypes*)
NUMA_INCS="-isystem$with_numa/include"
;;
*)
NUMA_INCS="-I$with_numa/include"
;;
esac
if test "$
have
_numa" != "no"; then
if test "x$with_numa" != "xyes" -a "x$with_numa" != "x"; then
case "$CFLAGS" in
*strict-prototypes*)
NUMA_INCS="-isystem$with_numa/include"
;;
*)
NUMA_INCS="-I$with_numa/include"
;;
esac
fi
fi
AC_SUBST([NUMA_INCS])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment