diff options
author | Nils Durner <durner@gnunet.org> | 2009-05-29 19:41:40 +0000 |
---|---|---|
committer | Nils Durner <durner@gnunet.org> | 2009-05-29 19:41:40 +0000 |
commit | f195416e33659a11f16600ac56eded846d419ae8 (patch) | |
tree | 7c1e725468e23cdec950f685ddcd0b8a17616e7e | |
parent | 179946965cc0f171e4af1bd053b42ec36314c86e (diff) | |
download | gnunet-f195416e33659a11f16600ac56eded846d419ae8.tar.gz gnunet-f195416e33659a11f16600ac56eded846d419ae8.zip |
make ./bootstrap work
-rw-r--r-- | acinclude.m4 | 65 |
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 @@ | |||
1 | # See: http://gcc.gnu.org/ml/gcc/2000-05/msg01141.html | ||
2 | AC_DEFUN([CHECK_PTHREAD], | ||
3 | [ | ||
4 | AC_CHECK_LIB(pthread,pthread_create, | ||
5 | [ | ||
6 | PTHREAD_CPPFLAGS= | ||
7 | PTHREAD_LDFLAGS= | ||
8 | PTHREAD_LIBS=-lpthread | ||
9 | ],[ | ||
10 | AC_MSG_CHECKING(if compiler supports -pthread) | ||
11 | save_CPPFLAGS="$CPPFLAGS" | ||
12 | CPPFLAGS="$CPPFLAGS -pthread" | ||
13 | AC_TRY_LINK( | ||
14 | [ | ||
15 | #include <pthread.h> | ||
16 | ],[ | ||
17 | pthread_create(0,0,0,0); | ||
18 | ],[ | ||
19 | AC_MSG_RESULT(yes) | ||
20 | PTHREAD_CPPFLAGS=-pthread | ||
21 | PTHREAD_LDFLAGS=-pthread | ||
22 | PTHREAD_LIBS= | ||
23 | ],[ | ||
24 | AC_MSG_RESULT(no) | ||
25 | AC_MSG_CHECKING(if compiler supports -pthreads) | ||
26 | save_CPPFLAGS="$CPPFLAGS" | ||
27 | CPPFLAGS="$save_CPPFLAGS -pthreads" | ||
28 | AC_TRY_LINK( | ||
29 | [ | ||
30 | #include <pthread.h> | ||
31 | ],[ | ||
32 | pthread_create(0,0,0,0); | ||
33 | ],[ | ||
34 | AC_MSG_RESULT(yes) | ||
35 | PTHREAD_CPPFLAGS=-pthreads | ||
36 | PTHREAD_LDFLAGS=-pthreads | ||
37 | PTHREAD_LIBS= | ||
38 | ],[ | ||
39 | AC_MSG_RESULT(no) | ||
40 | AC_MSG_CHECKING(if compiler supports -threads) | ||
41 | save_CPPFLAGS="$CPPFLAGS" | ||
42 | CPPFLAGS="$save_CPPFLAGS -threads" | ||
43 | AC_TRY_LINK( | ||
44 | [ | ||
45 | #include <pthread.h> | ||
46 | ],[ | ||
47 | pthread_create(0,0,0,0); | ||
48 | ],[ | ||
49 | AC_MSG_RESULT(yes) | ||
50 | PTHREAD_CPPFLAGS=-threads | ||
51 | PTHREAD_LDFLAGS=-threads | ||
52 | PTHREAD_LIBS= | ||
53 | ],[ | ||
54 | AC_MSG_ERROR([Your system is not supporting pthreads!]) | ||
55 | ]) | ||
56 | ]) | ||
57 | ]) | ||
58 | CPPFLAGS="$save_CPPFLAGS" | ||
59 | ]) | ||
60 | ]) | ||
61 | |||
62 | dnl Checks for all prerequisites of the intl subdirectory, | ||
63 | dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, | ||
64 | dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. | ||
65 | AC_DEFUN([AM_INTL_SUBDIR], []) \ No newline at end of file | ||