File: aclocal.m4

package info (click to toggle)
fsp 2.81.b3-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,072 kB
  • ctags: 1,264
  • sloc: ansic: 7,764; makefile: 357; sh: 312
file content (54 lines) | stat: -rw-r--r-- 1,495 bytes parent folder | download | duplicates (4)
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
dnl These are local macros that I've needed to define to keep the 
dnl configure.in file readable or to correct for errors on certain systems
dnl such as linux's egrep returning the wrong exit status.
dnl
define(FSP_PROGRAM_GREP,
[AC_REQUIRE([AC_PROG_CPP])AC_PROVIDE([$0])cat > conftest.c <<EOF
[$2]
EOF
eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
if grep "$1" conftest.out >/dev/null 2>&1; then
  ifelse([$3], , :, [$3])
ifelse([$4], , , [else 
  $4
])dnl
fi
rm -f conftest*
])dnl
dnl
define(FSP_HEADER_GREP,
[AC_REQUIRE([AC_PROG_CPP])AC_PROVIDE([$0])echo '#include <$2>' > conftest.c
eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
if grep "$1" conftest.out >/dev/null 2>&1; then
  ifelse([$3], , :, [$3])
ifelse([$4], , , [else 
  $4
])dnl
fi
rm -f conftest*
])dnl
dnl
dnl
dnl checks for typedefs
dnl
define(FSP_UID_T,
[echo checking for uid_t in sys/types.h
FSP_HEADER_GREP(uid_t, sys/types.h, ,
  AC_DEFINE(uid_t, int) AC_DEFINE(gid_t, int))])dnl
dnl
define(FSP_NLINK_T,
[echo checking for nlink_t in sys/types.h
FSP_HEADER_GREP(nlink_t, sys/types.h, , AC_DEFINE(nlink_t, int))])dnl
dnl
define(FSP_SIZE_T,
[echo checking for size_t in sys/types.h
FSP_HEADER_GREP(size_t, sys/types.h, , AC_DEFINE(size_t, unsigned))])dnl
dnl
define(FSP_PID_T,
[echo checking for pid_t in sys/types.h
FSP_HEADER_GREP(pid_t, sys/types.h, , AC_DEFINE(pid_t, int))])dnl
dnl
define(FSP_MODE_T,
[echo checking for mode_t in sys/types.h
FSP_HEADER_GREP(mode_t, sys/types.h, , AC_DEFINE(mode_t, int))])dnl
dnl