comparison mcabber/configure.ac @ 821:8c64874c449e

More gcc configure checks
author Mikael Berthe <mikael@lilotux.net>
date Sun, 23 Apr 2006 09:53:28 +0200
parents a8d63395a710
children cefdaeb42e67
comparison
equal deleted inserted replaced
820:80bd7f49075f 821:8c64874c449e
7 AC_CONFIG_SRCDIR([src]) 7 AC_CONFIG_SRCDIR([src])
8 AM_CONFIG_HEADER(config.h) 8 AM_CONFIG_HEADER(config.h)
9 9
10 AC_PROG_RANLIB 10 AC_PROG_RANLIB
11 11
12 CFLAGS="$CFLAGS -Wall"
13
14 # Checks for programs. 12 # Checks for programs.
15 AC_PROG_CXX 13 AC_PROG_CXX
16 AC_PROG_CC 14 AC_PROG_CC
17 AC_PROG_INSTALL 15 AC_PROG_INSTALL
16
17 if test "x$GCC" = "xyes"; then
18 dnl Get gcc version
19 AC_MSG_CHECKING([gcc version])
20 gccver=$($CC -dumpversion)
21 gccvermajor=$(echo $gccver | cut -d . -f1)
22 gccverminor=$(echo $gccver | cut -d . -f2)
23 gccvernum=$(expr $gccvermajor "*" 100 + $gccverminor)
24 AC_MSG_RESULT($gccver)
25
26 CFLAGS="$CFLAGS -Wall"
27 fi
18 28
19 # Checks for libraries. 29 # Checks for libraries.
20 AC_CHECK_LIB([ncurses], [initscr]) 30 AC_CHECK_LIB([ncurses], [initscr])
21 AC_CHECK_LIB([panel], [new_panel]) 31 AC_CHECK_LIB([panel], [new_panel])
22 32
106 AC_ARG_ENABLE(debug, 116 AC_ARG_ENABLE(debug,
107 [AC_HELP_STRING(--enable-debug, Add development compilation options)], 117 [AC_HELP_STRING(--enable-debug, Add development compilation options)],
108 debug=$enableval, debug="") 118 debug=$enableval, debug="")
109 if test "${debug}" = "yes"; then 119 if test "${debug}" = "yes"; then
110 AC_DEFINE_UNQUOTED([DEBUG_ENABLE],[1],[Devel compilation options]) 120 AC_DEFINE_UNQUOTED([DEBUG_ENABLE],[1],[Devel compilation options])
111 CFLAGS="$CFLAGS -Wextra -Wno-unused-parameter -pedantic -std=gnu99 -O0 -g" 121 if test "x$GCC" = "xyes"; then
122 if test "$gccvernum" -ge "400"; then
123 CFLAGS="$CFLAGS -Wextra"
124 else
125 CFLAGS="$CFLAGS -W"
126 fi
127 CFLAGS="$CFLAGS -Wno-unused-parameter -pedantic -std=gnu99 -O0"
128 fi # gcc
129 CFLAGS="$CFLAGS -g"
112 else 130 else
113 CFLAGS="$CFLAGS -O2" 131 CFLAGS="$CFLAGS -O2"
114 fi 132 fi
115 133
116 AC_ARG_ENABLE(hgcset, 134 AC_ARG_ENABLE(hgcset,