Skip to content
Snippets Groups Projects
Commit cab5fdb5 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Build system: give the possibility to disable POSIX threads in configure script

(cherry picked from commit f560ae8f)
parent de6de16d
Branches
Tags
No related merge requests found
...@@ -162,7 +162,7 @@ License: LGPL-3+ ...@@ -162,7 +162,7 @@ License: LGPL-3+
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
Files: m4/ax_blas.m4, m4/ax_lapack.m4, m4/ax_pthread.m4 Files: m4/ax_blas.m4, m4/ax_lapack.m4
Copyright: 2008, Steven G. Johnson <stevenj@alum.mit.edu> Copyright: 2008, Steven G. Johnson <stevenj@alum.mit.edu>
License: GPL-3+ with special Autoconf exception License: GPL-3+ with special Autoconf exception
This program is free software: you can redistribute it and/or modify it This program is free software: you can redistribute it and/or modify it
...@@ -191,6 +191,36 @@ License: GPL-3+ with special Autoconf exception ...@@ -191,6 +191,36 @@ License: GPL-3+ with special Autoconf exception
modified version of the Autoconf Macro, you may extend this special modified version of the Autoconf Macro, you may extend this special
exception to the GPL to apply to your modified version as well. exception to the GPL to apply to your modified version as well.
Files: m4/ax_pthread.m4
Copyright: 2008, Steven G. Johnson <stevenj@alum.mit.edu>
2010, Dynare Team
License: GPL-3+ with special Autoconf exception
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
.
As a special exception, the respective Autoconf Macro's copyright owner
gives unlimited permission to copy, distribute and modify the configure
scripts that are the output of Autoconf when processing the Macro. You
need not follow the terms of the GNU General Public License when using
or distributing such scripts, even though portions of the text of the
Macro appear in them. The GNU General Public License (GPL) does govern
all other use of the material that constitutes the Autoconf Macro.
.
This special exception to the GPL applies to versions of the Autoconf
Macro released by the Autoconf Archive. When you make and distribute a
modified version of the Autoconf Macro, you may extend this special
exception to the GPL to apply to your modified version as well.
Files: m4/ax_boost_base.m4 Files: m4/ax_boost_base.m4
Copyright: 2008, Thomas Porschberg <thomas@randspringer.de> Copyright: 2008, Thomas Porschberg <thomas@randspringer.de>
2009, Dynare Team 2009, Dynare Team
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
# LICENSE # LICENSE
# #
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> # Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2010 Dynare Team
# #
# This program is free software: you can redistribute it and/or modify it # This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the # under the terms of the GNU General Public License as published by the
...@@ -82,6 +83,10 @@ AC_LANG_SAVE ...@@ -82,6 +83,10 @@ AC_LANG_SAVE
AC_LANG_C AC_LANG_C
ax_pthread_ok=no ax_pthread_ok=no
AC_ARG_WITH([pthread], [AS_HELP_STRING([--without-pthread], [don't use POSIX threads])], [], [with_readline=check])
if test "x$with_pthread" != "xno"; then
# We used to check for pthread.h first, but this fails if pthread.h # We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent). # requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway. # It gets checked for in the link test anyway.
...@@ -260,6 +265,8 @@ AC_SUBST(PTHREAD_LIBS) ...@@ -260,6 +265,8 @@ AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC) AC_SUBST(PTHREAD_CC)
fi
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$ax_pthread_ok" = xyes; then if test x"$ax_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment