… | |
… | |
137 | no) rtfdocs=false ;; |
137 | no) rtfdocs=false ;; |
138 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-rtf-docs) ;; |
138 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-rtf-docs) ;; |
139 | esac],[rtfdocs=false]) |
139 | esac],[rtfdocs=false]) |
140 | AM_CONDITIONAL(RTFDOCS,test x$rtfdocs = xtrue) |
140 | AM_CONDITIONAL(RTFDOCS,test x$rtfdocs = xtrue) |
141 | |
141 | |
|
|
142 | dnl This is stolen from gnome-libs-1.0.14 |
|
|
143 | AC_ARG_ENABLE(compile-warnings, |
|
|
144 | [ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.], |
|
|
145 | ,enable_compile_warnings=minimum) |
|
|
146 | |
|
|
147 | AC_MSG_CHECKING(what warning flags to pass to the C compiler) |
|
|
148 | warnCFLAGS= |
|
|
149 | if test "x$GCC" != xyes; then |
|
|
150 | enable_compile_warnings=no |
|
|
151 | fi |
|
|
152 | if test "x$enable_compile_warnings" != "xno"; then |
|
|
153 | if test "x$GCC" = "xyes"; then |
|
|
154 | case " $CFLAGS " in |
|
|
155 | *[\ \ ]-Wall[\ \ ]*) ;; |
|
|
156 | *) warnCFLAGS="-Wall -Wunused" ;; |
|
|
157 | esac |
|
|
158 | |
|
|
159 | ## -W is not all that useful. And it cannot be controlled |
|
|
160 | ## with individual -Wno-xxx flags, unlike -Wall |
|
|
161 | if test "x$enable_compile_warnings" = "xyes"; then |
|
|
162 | warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith" |
|
|
163 | fi |
|
|
164 | fi |
|
|
165 | fi |
|
|
166 | AC_MSG_RESULT($warnCFLAGS) |
|
|
167 | |
|
|
168 | AC_ARG_ENABLE(iso-c, |
|
|
169 | [ --enable-iso-c Try to warn if code is not ISO C ],, |
|
|
170 | enable_iso_c=no) |
|
|
171 | |
|
|
172 | AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) |
|
|
173 | complCFLAGS= |
|
|
174 | if test "x$enable_iso_c" != "xno"; then |
|
|
175 | if test "x$GCC" = "xyes"; then |
|
|
176 | case " $CFLAGS " in |
|
|
177 | *[\ \ ]-ansi[\ \ ]*) ;; |
|
|
178 | *) complCFLAGS="$complCFLAGS -ansi" ;; |
|
|
179 | esac |
|
|
180 | |
|
|
181 | case " $CFLAGS " in |
|
|
182 | *[\ \ ]-pedantic[\ \ ]*) ;; |
|
|
183 | *) complCFLAGS="$complCFLAGS -pedantic" ;; |
|
|
184 | esac |
|
|
185 | fi |
|
|
186 | fi |
|
|
187 | AC_MSG_RESULT($complCFLAGS) |
|
|
188 | if test "x$cflags_set" != "xyes"; then |
|
|
189 | CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS" |
|
|
190 | cflags_set=yes |
|
|
191 | AC_SUBST(cflags_set) |
|
|
192 | fi |
|
|
193 | |
142 | AC_OUTPUT([Makefile compat/Makefile lib/Makefile psiconv/Makefile lib/general.h formats/Makefile docs/Makefile]) |
194 | AC_OUTPUT([Makefile compat/Makefile lib/Makefile psiconv/Makefile lib/general.h formats/Makefile docs/Makefile]) |