From 097d9165249ae39045d97d5c4db19058a45e58a0 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Sun, 19 Aug 2012 23:24:34 +0200 Subject: [PATCH] Add OPENMP_LIB_LDFLAGS for OpenMP support on Mac OS X. --- configure.ac | 13 +++++++++++++ src/ctobssim/Makefile.am | 1 + 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 3bbcdfa..f619a62 100644 --- a/configure.ac +++ b/configure.ac @@ -734,6 +734,19 @@ else AC_MSG_RESULT(no) fi +# Set system specific settings +OPENMP_LIB_LDFLAGS= +if test "x$enable_openmp" = "xyes"; then + case $ac_sys_system/$ac_sys_release in + Darwin/*) + # + # + OPENMP_LIB_LDFLAGS=-lgomp + ;; + esac +fi +AC_SUBST(OPENMP_LIB_LDFLAGS) + # Signal if ctools cannot be compiled as gammalibe requires OpenMP but ctools # cannot be compiled with OpenMP if test "x$enable_openmp" = "xno" && test "x$gammalib_with_openmp" = "xyes"; then diff --git a/src/ctobssim/Makefile.am b/src/ctobssim/Makefile.am index 4c9f8e9..1545fe1 100644 --- a/src/ctobssim/Makefile.am +++ b/src/ctobssim/Makefile.am @@ -9,6 +9,7 @@ sources = ctobssim.cpp # Libtool library noinst_LTLIBRARIES = libctobssim.la libctobssim_la_SOURCES = $(sources) +libctobssim_la_LDFLAGS = @OPENMP_LIB_LDFLAGS@ # Program definition ctobssim_SOURCES = main.cpp -- libgit2 0.21.4