summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorNils Durner <durner@gnunet.org>2009-05-29 19:41:40 +0000
committerNils Durner <durner@gnunet.org>2009-05-29 19:41:40 +0000
commitf195416e33659a11f16600ac56eded846d419ae8 (patch)
tree7c1e725468e23cdec950f685ddcd0b8a17616e7e /acinclude.m4
parent179946965cc0f171e4af1bd053b42ec36314c86e (diff)
make ./bootstrap work
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m465
1 files changed, 65 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 000000000..d17f1c58e
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,65 @@
+# See: http://gcc.gnu.org/ml/gcc/2000-05/msg01141.html
+AC_DEFUN([CHECK_PTHREAD],
+[
+ AC_CHECK_LIB(pthread,pthread_create,
+ [
+ PTHREAD_CPPFLAGS=
+ PTHREAD_LDFLAGS=
+ PTHREAD_LIBS=-lpthread
+ ],[
+ AC_MSG_CHECKING(if compiler supports -pthread)
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -pthread"
+ AC_TRY_LINK(
+ [
+ #include <pthread.h>
+ ],[
+ pthread_create(0,0,0,0);
+ ],[
+ AC_MSG_RESULT(yes)
+ PTHREAD_CPPFLAGS=-pthread
+ PTHREAD_LDFLAGS=-pthread
+ PTHREAD_LIBS=
+ ],[
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING(if compiler supports -pthreads)
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$save_CPPFLAGS -pthreads"
+ AC_TRY_LINK(
+ [
+ #include <pthread.h>
+ ],[
+ pthread_create(0,0,0,0);
+ ],[
+ AC_MSG_RESULT(yes)
+ PTHREAD_CPPFLAGS=-pthreads
+ PTHREAD_LDFLAGS=-pthreads
+ PTHREAD_LIBS=
+ ],[
+ AC_MSG_RESULT(no)
+ AC_MSG_CHECKING(if compiler supports -threads)
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$save_CPPFLAGS -threads"
+ AC_TRY_LINK(
+ [
+ #include <pthread.h>
+ ],[
+ pthread_create(0,0,0,0);
+ ],[
+ AC_MSG_RESULT(yes)
+ PTHREAD_CPPFLAGS=-threads
+ PTHREAD_LDFLAGS=-threads
+ PTHREAD_LIBS=
+ ],[
+ AC_MSG_ERROR([Your system is not supporting pthreads!])
+ ])
+ ])
+ ])
+ CPPFLAGS="$save_CPPFLAGS"
+ ])
+])
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+ AC_DEFUN([AM_INTL_SUBDIR], []) \ No newline at end of file