1 | # -*- Autoconf -*- |
---|
2 | # Process this file with autoconf to produce a configure script. |
---|
3 | |
---|
4 | AC_PREREQ(2.61) |
---|
5 | AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) |
---|
6 | AC_CONFIG_SRCDIR([reporter.h]) |
---|
7 | AC_CONFIG_HEADER([config.h]) |
---|
8 | |
---|
9 | # Checks for programs. |
---|
10 | AC_PROG_CXX |
---|
11 | AC_PROG_CC |
---|
12 | AC_PROG_LN_S |
---|
13 | AC_PROG_INSTALL |
---|
14 | |
---|
15 | # Checks for libraries. |
---|
16 | |
---|
17 | # Checks for header files. |
---|
18 | AC_HEADER_STDC |
---|
19 | AC_CHECK_HEADERS([stdlib.h string.h unistd.h pwd.h]) |
---|
20 | |
---|
21 | # Checks for typedefs, structures, and compiler characteristics. |
---|
22 | AC_C_CONST |
---|
23 | AC_C_INLINE |
---|
24 | |
---|
25 | # Checks for library functions. |
---|
26 | AC_FUNC_VPRINTF |
---|
27 | AC_CHECK_FUNC([vsnprintf], [AC_DEFINE([HAVE_VSNPRINTF], [1], |
---|
28 | [Define if vsnprintf exists.])]) |
---|
29 | |
---|
30 | # check whether the compiler accepts -pipe |
---|
31 | if test x$ac_cv_c_cpp = xgcc2 -o x$ac_cv_c_cpp = xgcc3 |
---|
32 | then |
---|
33 | AC_MSG_CHECKING(whether compiler accepts -pipe) |
---|
34 | temp_cflags="${CFLAGS}" |
---|
35 | CFLAGS="${CFLAGS} -pipe" |
---|
36 | AC_CACHE_VAL(ac_cv_cxx_have_pipe, |
---|
37 | AC_TRY_COMPILE(,,ac_cv_cxx_have_pipe=yes,ac_cv_cxx_have_pipe=no)) |
---|
38 | AC_MSG_RESULT(${ac_cv_cxx_have_pipe}) |
---|
39 | CFLAGS=${temp_cflags} |
---|
40 | else |
---|
41 | ac_cv_cxx_have_pipe="no" |
---|
42 | fi |
---|
43 | |
---|
44 | if test "${ac_cv_cxx_have_pipe}" != yes; then |
---|
45 | PIPE= |
---|
46 | else |
---|
47 | PIPE="-pipe" |
---|
48 | fi |
---|
49 | AC_SUBST(PIPE) |
---|
50 | |
---|
51 | dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll |
---|
52 | dnl path stuff |
---|
53 | dnl |
---|
54 | |
---|
55 | project=singular |
---|
56 | component=reporter |
---|
57 | |
---|
58 | dnl set exec_prefix, libdir, includedir to some sensible values |
---|
59 | dnl if they are not yet already set |
---|
60 | |
---|
61 | # expand prefix |
---|
62 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
---|
63 | |
---|
64 | # expand exec_prefixad |
---|
65 | if test "x$exec_prefix" = xNONE; then |
---|
66 | exec_prefix=${prefix} |
---|
67 | fi |
---|
68 | |
---|
69 | # expand libdir |
---|
70 | test "x$libdir" = 'x${exec_prefix}/lib'&& libdir="${exec_prefix}/lib/${project}/${component}" |
---|
71 | |
---|
72 | # expand includedir |
---|
73 | test "x$includedir" = 'x${prefix}/include' && includedir="${exec_prefix}/include/${project}/${component}" |
---|
74 | |
---|
75 | AC_CONFIG_FILES([Makefile]) |
---|
76 | AC_OUTPUT |
---|