Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Unity-Technologies/bdwgc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-10-16 11:00:53 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-10-16 11:00:53 +0300
commit3d343355edd93994bacd523364186ffe50b95b43 (patch)
treead13b277d1853cb1e69f2ac0c8a54b00529f584e /configure.ac
parent58c5c0535d3ecdab06f4a440d22300c7a713130c (diff)
Allow PKG_CHECK_MODULES in configure.ac to be commented out easily
(code refactoring) * configure.ac [$with_libatomic_ops!=no && $with_libatomic_ops!=none] (missing_libatomic_ops): Set to true (before PKG_CHECK_MODULES). * configure.ac [$missing_libatomic_ops] (PKG_CHECK_MODULES): Set missing_libatomic_ops back to false if atomic_ops module is not found; add comment (about pkg-config and the possibility to comment out PKG_CHECK_MODULES).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 5826eebe..d56a020b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -997,12 +997,19 @@ fi
# Check for an external libatomic_ops if the above answer is "yes" or "check".
# If not found, fail on "yes", and convert "check" to "no".
-# Note: "syntax error near unexpected token ATOMIC_OPS" reported by configure
-# means Autotools pkg.m4 file was not found during aclocal.m4 generation.
+# First, check that libatomic_ops usage is not disabled explicitly.
missing_libatomic_ops=false
AS_IF([test x"$with_libatomic_ops" != xno -a x"$with_libatomic_ops" != xnone],
- [ PKG_CHECK_MODULES([ATOMIC_OPS], [atomic_ops], [],
- [ missing_libatomic_ops=true ]) ])
+ [ missing_libatomic_ops=true ])
+
+# Note: "syntax error near unexpected token ATOMIC_OPS" reported by configure
+# means Autotools pkg.m4 file was not found during aclocal.m4 generation;
+# in this case, most probably, you should run pkg-config once before running
+# autogen.sh (autoreconf); alternatively, comment out the following 3 lines.
+AS_IF([test x$missing_libatomic_ops = xtrue],
+ [ PKG_CHECK_MODULES([ATOMIC_OPS], [atomic_ops],
+ [ missing_libatomic_ops=false ]) ])
+
# Retry with AC_CHECK_HEADER if PKG_CHECK_MODULES failed.
AS_IF([test x$missing_libatomic_ops = xtrue],
[ AC_CHECK_HEADER([atomic_ops.h], [missing_libatomic_ops=false]) ])