Takuro Ashie
makei****@users*****
2006年 11月 22日 (水) 14:09:18 JST
Index: libtomoe-gtk/ChangeLog diff -u libtomoe-gtk/ChangeLog:1.131 libtomoe-gtk/ChangeLog:1.132 --- libtomoe-gtk/ChangeLog:1.131 Tue Nov 21 19:53:52 2006 +++ libtomoe-gtk/ChangeLog Wed Nov 22 14:09:18 2006 @@ -1,3 +1,7 @@ +2006-11-22 Takuro Ashie <ashie****@home*****> + + * configure.ac: Add CFLAGS. + 2006-11-21 Hiroyuki Ikezoe <poinc****@ikezo*****> * src/tomoe-char-table.c: Use G_DEFINE_TYPE_EXTENDED. Index: libtomoe-gtk/configure.ac diff -u libtomoe-gtk/configure.ac:1.9 libtomoe-gtk/configure.ac:1.10 --- libtomoe-gtk/configure.ac:1.9 Thu Nov 16 14:23:22 2006 +++ libtomoe-gtk/configure.ac Wed Nov 22 14:09:18 2006 @@ -19,6 +19,58 @@ # Checks for programs. AC_PROG_CC +dnl ************************************************************** +dnl CFLAGS +dnl ************************************************************** + +AC_ARG_ENABLE(Werror, [ --enable-Werror Enable -Werror option for GCC]) + +if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *[\ \ ]-Wall[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -Wall" ;; + esac + + case " $CFLAGS " in + *[\ \ ]-Wmissing-declarations[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -Wmissing-declarations" ;; + esac + + case " $CFLAGS " in + *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;; + esac + + case " $CFLAGS " in + *[\ \ ]-Wpointer-arith[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -Wpointer-arith" ;; + esac + + case " $CFLAGS " in + *[\ \ ]-Wcast-align[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -Wcast-align" ;; + esac + + if test "x$enable_Werror" = "xyes"; then + case " $CFLAGS " in + *[\ \ ]-Werror[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -Werror" ;; + esac + fi + + if test "x$enable_ansi" = "xyes"; then + case " $CFLAGS " in + *[\ \ ]-ansi[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -ansi" ;; + esac + + case " $CFLAGS " in + *[\ \ ]-pedantic[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -pedantic" ;; + esac + fi +fi + # pkg-config PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.4.0]) AC_SUBST(GTK2_CFLAGS)