-Update configure template to autoconf 2.68

-Upd configure to disable warning only when enable-debug option ain't selected. (thus if you wanna see more warnings compile with enable-debug)
-Add -Wconversion in configure.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17061 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
glighta 2012-12-29 06:44:29 +00:00
parent ac430975a8
commit dbaa8149c4
2 changed files with 187 additions and 160 deletions

316
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -331,7 +331,7 @@ AC_PATH_PROG(AR, ar)
AC_LANG([C])
CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wno-sign-compare"
CFLAGS="$CFLAGS -pipe -ffast-math -Wall"
CPPFLAGS="$CPPFLAGS -I../common"
@ -420,12 +420,13 @@ OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wno-unused-parameter"
AC_COMPILE_IFELSE(
[int foo;],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])],
[
AC_MSG_RESULT([no])
CFLAGS="$OLD_CFLAGS"
AC_MSG_RESULT([yes])
PROD_WARN="$PROD_WARN -Wno-unused-parameter"
]
)
CFLAGS="$OLD_CFLAGS"
#
@ -477,19 +478,18 @@ AC_COMPILE_IFELSE(
[int foo;],
[
AC_MSG_RESULT([yes])
CFLAGS="$OLD_CFLAGS -Wno-pointer-sign"
PROD_WARN="$PROD_WARN -Wno-pointer-sign"
],
[
AC_MSG_RESULT([no])
CFLAGS="$OLD_CFLAGS"
]
)
],
[
AC_MSG_RESULT([no])
CFLAGS="$OLD_CFLAGS"
AC_MSG_RESULT([no])
]
)
CFLAGS="$OLD_CFLAGS"
AC_MSG_CHECKING([whether $CC supports -Wno-switch])
@ -497,13 +497,14 @@ OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wno-switch"
AC_COMPILE_IFELSE(
[int foo;],
[AC_MSG_RESULT([yes])],
[ AC_MSG_RESULT([yes])
PROD_WARN="$PROD_WARN -Wno-switch"
],
[
AC_MSG_RESULT([no])
CFLAGS="$OLD_CFLAGS"
]
)
CFLAGS="$OLD_CFLAGS"
AC_MSG_CHECKING([whether $CC supports -fPIC])
OLD_CFLAGS="$CFLAGS"
@ -604,10 +605,10 @@ fi
case $enable_debug in
"no")
# default value
CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses"
CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses $PROD_WARN"
;;
"yes")
CFLAGS="$CFLAGS -g -DDEBUG"
CFLAGS="$CFLAGS -g -DDEBUG -Wconversion"
;;
"gdb")
CFLAGS="$CFLAGS -ggdb -DDEBUG"
@ -854,7 +855,7 @@ else
AC_MSG_RESULT([no])
fi
AC_MSG_NOTICE([PROD_WARN= $PROD_WARN])
AC_MSG_NOTICE([Configure finish, CFLAG= $CFLAGS])
###############################################################################
AC_OUTPUT