-
Notifications
You must be signed in to change notification settings - Fork 26
/
configure.in
82 lines (63 loc) · 1.62 KB
/
configure.in
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
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(src/main.c)
AC_PREFIX_DEFAULT(/usr/local)
AM_INIT_AUTOMAKE(kobs-ng, 0.0.1)
dnl Checks for programs.
dnl try to gues cross-compiler if not set
if test "x$target" != "x$host" -a -z "`echo $CC | grep -e '-gcc'`";
then
AC_MSG_CHECKING(for cross-compiler)
which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
which ${target_cpu}-${target_os}-gcc >/dev/null 2>&1 \
&& CC=${target_cpu}-${target-os}-gcc
which ${target_cpu}-${target_vendor}-${target_os}-gcc >/dev/null 2>&1 \
&& CC=${target_cpu}-${target_vendor}-${target_os}-gcc
AC_MSG_RESULT($CC)
fi
AC_PROG_CC
dnl AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
dnl Checks for header files.
AC_HEADER_STDC
test "x$prefix" = xNONE && prefix=$ac_default_prefix
eval dir="$datadir"
case "$dir" in
/*) ;;
*) dir="$prefix/share"
esac
AM_CONFIG_HEADER(include/config.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_HEADER_TIME
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
dnl Enable largefile support
AC_SYS_LARGEFILE
dnl big endian?
AC_C_BIGENDIAN
dnl Some machine CFLAGS tweaking
common_CFLAGS=""
machine_CFLAGS=""
cpu_CFLAGS=""
AC_MSG_CHECKING([machine/cpu specific CFLAGS])
if test "$ac_cv_c_compiler_gnu" = yes; then
common_CFLAGS="-Wall"
case $ac_cv_target_cpu in
*)
;;
esac
case $ac_cv_target_cpu in
*)
;;
esac
fi
AC_MSG_RESULT($common_CFLAGS $machine_CFLAGS $cpu_CFLAGS)
CFLAGS="$CFLAGS $common_CFLAGS $machine_CFLAGS $cpu_CFLAGS"
SAVE_KOBS_NG_VERSION
AC_OUTPUT(
Makefile
include/Makefile
src/Makefile)