-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathconfigure.ac
82 lines (67 loc) · 1.87 KB
/
configure.ac
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
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Contributed by Dan McMahill
dnl
AC_INIT
AC_CONFIG_SRCDIR([src/dvmain.c])
AM_INIT_AUTOMAKE(datadraw, 3.1.X-unstable)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
dnl checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_INSTALL
AM_PROG_LEX
AC_PROG_YACC
# Datadraw uses itself to produce one of its files.
# if we have a datadraw installed go ahead and enable
# some extra rules. FIXME -- do we ultimately need a 2
# stage build like what gcc does? Build datadraw then
# rebuild again??
#
# If we are cross compiling then we need to search for a
# datadraw binary to use for the build of dataview. This can
# either be an installed datadraw in our search path or
# it can be specified like:
#
# env DATADRAW=/opt/ddr/bin/datadraw ./configure \
# --host=alpha--netbsd --build=i686--linux
#
if test "$cross_compiling" = "yes" ; then
AC_PATH_PROG(DATADRAW, datadraw, [notfound])
else
DATADRAW=../src/datadraw
AC_SUBST([DATADRAW])
fi
AM_CONDITIONAL(MISSING_DATADRAW, test x$DATADRAW = xnotfound)
# if we have gcc and we've asked for debugging then add lots of -W
if test "x$GCC" = "xyes" ; then
for flag in -Wall -W -Wno-unused-parameter -Wno-unused-function; do
case " ${CFLAGS} " in
*\ ${flag}\ *)
# flag is already present
;;
*)
AC_MSG_CHECKING([If the compiler accepts ${flag}])
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS ${flag}"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
CFLAGS="${old_CFLAGS}"
]
)
;;
esac
done
fi
dnl checks for headers
#AC_CHECK_HEADERS([ctype.h stdlib.h string.h])
AC_MSG_RESULT([
** Configuration summary for $PACKAGE $VERSION:
CPPFLAGS: $CPPFLAGS
CFLAGS: $CFLAGS
LIBS: $LIBS
])
AC_CONFIG_FILES([Makefile util/Makefile src/Makefile dataview/Makefile])
AC_OUTPUT