Explorar o código

-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

glighta %!s(int64=12) %!d(string=hai) anos
pai
achega
dbaa8149c4
Modificáronse 2 ficheiros con 141 adicións e 131 borrados
  1. 125 116
      configure
  2. 16 15
      configure.in

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 125 - 116
configure


+ 16 - 15
configure.in

@@ -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

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio