File: acinclude.m4

package info (click to toggle)
warped 20031216-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,276 kB
  • ctags: 2,616
  • sloc: cpp: 16,610; sh: 7,071; makefile: 318
file content (127 lines) | stat: -rw-r--r-- 4,039 bytes parent folder | download
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
dnl
dnl Check for pccts header (antlr and dlg) and header files needed
dnl by files generated by these tools
dnl
dnl Usage: CL_PROG_HEADERS
dnl
AC_DEFUN(CL_PCCTS_HEADERS,
[
AC_CACHE_CHECK([for PCCTS includes], [cl_cv_path_pcctsheaders],
  [AC_ARG_WITH(pccts-headers,
    AC_HELP_STRING([--with-pccts-headers],
      [specify location of PCCTS headers (default is /usr/include/pccts)]),
    [
      case "${withval}" in
        yes)  cl_cv_path_pcctsheaders=/usr/include/pccts ;;
        no)   cl_cv_path_pcctsheaders=no ;;
        *)    cl_cv_path_pcctsheaders=$withval ;;
      esac
    ],
    [cl_cv_path_pcctsheaders=/usr/include/pccts]
  )]
)

if test $cl_cv_path_pcctsheaders = no; then
AC_MSG_ERROR(PCCTS includes required.  Please specify the location with
the --with-pccts-headers option.)
fi
CPPFLAGS="$CPPFLAGS -I$cl_cv_path_pcctsheaders"
AC_CHECK_HEADER(AParser.h, ,
  AC_MSG_ERROR(Could not find PCCTS headers.
    Please specify the correct location with the --with-pccts-headers option.))
PCCTSROOT=$cl_cv_path_pcctsheaders

]) dnl end CL_	PROG_PCCTS


dnl
dnl Check for libclutils
dnl
dnl Usage: CL_LIB_CLUTILS
dnl
AC_DEFUN(CL_LIB_CLUTILS,
[
AC_CACHE_CHECK([for location of libclutils], [cl_cv_lib_clutils],
  [AC_ARG_WITH(clutils,
    AC_HELP_STRING([--with-clutils],
      [location of libclutils (default is /usr)]),
      [
        case "${withval}" in
          yes)  cl_cv_lib_clutils=/usr ;;
          no)   cl_cv_lib_clutils=no ;;
          *)    cl_cv_lib_clutils=$withval ;;
        esac
      ],
      [cl_cv_lib_clutils=/usr]
  )]
)
if test $cl_cv_lib_clutils = no ; then
AC_MSG_ERROR(The clutils package is required.)
fi
if test $cl_cv_lib_clutils != /usr ; then
LDFLAGS="$LDFLAGS -L$cl_cv_lib_clutils/lib"
CPPFLAGS="$CPPFLAGS -I$cl_cv_lib_clutils/include"
fi
AC_CHECK_HEADER(clutils/Debug.h, ,
  AC_MSG_ERROR(Couldn't find clutils/Debug.h which is required and 
    part of the clutils distribution.  You probably need to install it
    and/or specify the location of it with the --with-clutils option.))
AC_SEARCH_LIBS(dlopen, [dl])
AC_CHECK_LIB(clutils, isClutils, ,
  AC_MSG_ERROR(Could not find a workable libclutils.so or libclutils.a.
    You probably need to install clutils and/or specify the location of
    it with the --with-clutils option.), -lltdl)
]) dnl end CL_LIB_CLUTILS

dnl Check for cppunit

dnl Usage: CL_LIB_CPPUNIT

AC_DEFUN(CL_LIB_CPPUNIT,
[
AC_CACHE_CHECK([for location of libcppunit], [cl_cv_lib_cppunit],
  [AC_ARG_WITH(cppunit,
    AC_HELP_STRING([--with-cppunit],
      [location of libcppunit (default is /usr)]),
      [
        case "${withval}" in
          yes)  cl_cv_lib_cppunit=/usr; ;;
          no)   cl_cv_lib_cppunit=no ;;
          "")   cl_cv_lib_cppunit=no ;;
          *)    cl_cv_lib_cppunit=$withval ;;
        esac
      ],
      [cl_cv_lib_cppunit=/usr]
  )]
)

if test $cl_cv_lib_cppunit = no ; then
   Disable the build of the unit tests
  AC_MSG_ERROR("cpp_unit_disabled via --with-cppunit")
  AC_SUBST(CPP_UNIT_TEST_DIR, "")
  return;
fi

if test $cl_cv_lib_cppunit != /usr ; then
LDFLAGS="$LDFLAGS -L$cl_cv_lib_cppunit/lib"
CPPFLAGS="$CPPFLAGS -I$cl_cv_lib_cppunit/include"
fi

dnl We might want to add addition checks for CPPUNIT headers later
AC_CHECK_HEADER(cppunit/Test.h, ,
  AC_MSG_WARN(Couldn't find cppunit/TestCase.h which is optional but
    required to run the unit tests in the 'test' directory. This file is
    part of the cppunit distribution.  You probably need to install it
    and/or specify the location of it with the --with-cppunit option.))

dnl Check for the CPPUNIT library
AC_CHECK_LIB(cppunit, main, 
  [AC_SUBST(CPP_UNIT_TEST_DIR,[test]) \
        LIBS="$LIBS -lcppunit"], 
  [AC_SUBST(CPP_UNIT_TEST_DIR, "") \
  AC_MSG_WARN(Couldn't find cppunit library which is optional but
    required to run the unit tests in the 'test' directory. This file is
    part of the cppunit distribution.  You probably need to install it
    and/or specify the location of it with the --with-cppunit option.)
        ])
]) dnl end CL_LIB_WARPED