File: configure.in

package info (click to toggle)
quinn-diff 0.44
  • links: PTS
  • area: main
  • in suites: slink
  • size: 528 kB
  • ctags: 266
  • sloc: ansic: 2,431; sh: 595; makefile: 61; python: 11
file content (85 lines) | stat: -rw-r--r-- 2,157 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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/main.c)
AC_CONFIG_AUX_DIR(scripts)
AM_INIT_AUTOMAKE(quinn-diff, 0.44)
AM_CONFIG_HEADER(config.h)

PACKAGE=quinn-diff
AC_SUBST(PACKAGE)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
VERSION=0.44
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")

dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL

dnl Electric Fence
opt_efence=no
AC_ARG_WITH(efence, [  --with-efence          compile with electric fence], opt_efence=yes)
if test "$opt_efence" = "yes"; then
  case "x$withval" in
  x/*|x.*)
    EFENCE="$withval"
    ;;
  *)
    EFENCE="/usr/lib/libefence.a"
    ;;
  esac
  if test ! -s "$EFENCE"; then
     AC_MSG_RESULT([Warning: $EFENCE does not exist])
  else
     AC_MSG_RESULT([Compiling with electric fence ($EFENCE)])
  fi
else
  EFENCE=
fi
AC_SUBST(EFENCE)
withval=""

dnl --with-includes
AC_ARG_WITH(includes, [  --with-includes=DIR     search include DIR for optional packages below])
case "x$withval" in
x/*|x.*)
  if test ! -d "$withval"; then
    AC_MSG_RESULT([Warning: Directory $withval does not exist])
  else
    CPPFLAGS="$CPPFLAGS -I$withval"
    AC_MSG_RESULT([adding $withval to include search path for following packages])
  fi
  ;;
*)
  ;;
esac

dnl Checks for libraries.
AC_CHECK_LIB(db, dbopen)

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T

dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strerror strstr strtol strtoul)

dnl Check for whether GCC's debug flags are wanted
opt_debug=no
AC_ARG_WITH(debug, [  --with-debug          compile with maximum (GCC) warnings and debug info], opt_debug=yes)
if test "$opt_debug" = "yes"; then
  CFLAGS="-g3 -ggdb3 -W -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline"
  AC_MSG_RESULT([Compiling with maximum warnings and debug information])
else
  CFLAGS="-O2"
fi
withval=""

dnl CFLAGS="$CFLAGS $DEBUG_FLAGS"

AC_OUTPUT([Makefile src/Makefile])