summaryrefslogtreecommitdiff
path: root/ubi-utils/configure.ac
blob: 9f451761b856b00ea60ffed517b25b16aba316b4 (plain)
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
# Don't remove this check.
AC_PREREQ(2.59)

# AC_INIT: Package, Version, Bugs
AC_INIT([flashutils],[0.1],[arnez@de.ibm.com])
AC_CONFIG_HEADERS([inc/config.h:inc/config-h.in])
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([1.8 foreign])
AM_MAINTAINER_MODE

# Check debug options
AS_HELP_STRING
AC_ARG_ENABLE([debug],
	      AS_HELP_STRING([--enable-debug],
			     [build with debug information [default=yes]]),,enable_debug="yes")

# Check for programs.
AM_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET

# Checks for header files.
AC_HEADER_STDC
# FIXME: Use AC_CHECK_HEADERS for UBI stuff.
# AC_CHECK_HEADERS([errno.h mtd/ubi-user.h])
AC_CHECK_HEADERS([errno.h])

# Set build flags
if test "x$enable_debug" = "xyes"; then
	CFLAGS="$CFLAGS -g -DDEBUG "
fi

AC_DEFINE_UNQUOTED(HOST_OS, "${host}", [Host OS])
AC_DEFINE_UNQUOTED(HOST_CPU, "${host_os}", [Host CPU])
AC_DEFINE_UNQUOTED(BUILD_OS, "${build_os}", [Build OS])
AC_DEFINE_UNQUOTED(BUILD_CPU, "${build_cpu}", [Build CPU])

# Additional Config
AC_C_BIGENDIAN

# CFLAGS
CFLAGS="-std=gnu99 -Wundef -Wall $CFLAGS"

# Init output.
AC_CONFIG_FILES([
	   Makefile
	   lib/Makefile
	   inc/Makefile
])

AC_OUTPUT