summaryrefslogtreecommitdiff
path: root/benchmarks/filebench/patches/patch-configure.ac
blob: c7864e321ed6a5a610382daa2a073493d84d500b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
$NetBSD: patch-configure.ac,v 1.2 2013/01/26 21:59:40 wiz Exp $

First chunk: automake-1.13 compat.
Second chunk: Fix unportable test(1) construct.
Rest: ?

--- configure.ac.orig	2011-09-06 17:17:45.000000000 +0000
+++ configure.ac
@@ -2,7 +2,7 @@
 #### Initialization stubs
 ####
 AC_INIT([filebench], [1.4.9.1])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE
 
 ####
@@ -31,7 +31,7 @@ AC_CHECK_HEADERS([netdb.h])
 AC_CHECK_HEADERS([netinet/in.h])
 AC_CHECK_HEADERS([stddef.h])
 AC_CHECK_HEADERS([math.h])
-if test "$ac_cv_header_math_h" == no
+if test "$ac_cv_header_math_h" = no
 then
 	AC_MSG_ERROR([The math.h header is missing! If you use OpenIndiana b148, install "header-math" package.])
 fi
@@ -212,6 +212,9 @@ AC_CHECK_FILE(
 	[AC_DEFINE(HAVE_PROC_STAT, 1, [Checking if you have /proc/stat])]
 )
 
+AC_CHECK_HEADERS([asm/unistd.h],
+	[AC_DEFINE(HAVE_ASM_UNISTD_H, 1, [Checking if you have <asm/unistd.h>])])
+
 # this checks if stat file is present ins /proc/<pid> directory. This file is
 # used to get per thread per operation CPU usage statistics on Linux
 # distributions. To facilitate this check,we are checking if stat file exists
@@ -469,6 +472,17 @@ AC_TRY_COMPILE([
   ], AC_MSG_RESULT(no)
 )
 
+AC_MSG_CHECKING(gettid)
+AC_TRY_COMPILE([
+#include <asm/unistd.h>
+],
+[ int nr_gettid = __NR_gettid;
+],[
+    AC_DEFINE(HAVE_GETTID,1,[ Define if have gettid])
+    AC_MSG_RESULT(yes)
+  ], AC_MSG_RESULT(no)
+)
+
 ####
 #### Check for structure members
 ####