diff --git a/configure.ac b/configure.ac index a09d6417..ce7985ff 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # To compile this into a configure script, you need: -# * Autoconf 2.50 or newer +# * Autoconf 2.59c or newer # * Gtk (for $prefix/share/aclocal/gtk.m4) # * Automake (for aclocal) # If you've got them, running "autoreconf" should work. @@ -17,6 +17,8 @@ AC_PROG_RANLIB ifdef([AM_PROG_AR],[AM_PROG_AR]) AM_PROG_CC_C_O +AC_PROG_CC_C99 + # Mild abuse of the '--enable' option format to allow manual # specification of setuid or setgid setup in pterm. setidtype=none diff --git a/mkfiles.pl b/mkfiles.pl index de68fd0e..9427db65 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -627,8 +627,8 @@ if (defined $makefiles{'cygwin'}) { "# You may also need to tell windres where to find include files:\n". "# RCINC = --include-dir c:\\cygwin\\include\\\n". "\n". - &splitline("CFLAGS = -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT". - " -D_NO_OLDNAMES " . + &splitline("CFLAGS = -Wall -O2 -std=gnu99 -D_WINDOWS -DDEBUG". + " -DWIN32S_COMPAT -D_NO_OLDNAMES " . (join " ", map {"-I$dirpfx$_"} @srcdirs)) . "\n". "LDFLAGS = -s\n". @@ -1420,7 +1420,7 @@ if (defined $makefiles{'gtk'}) { "\n". "unexport CFLAGS # work around a weird issue with krb5-config\n". "\n". - &splitline("CFLAGS = -O2 -Wall -Werror -g " . + &splitline("CFLAGS = -O2 -Wall -Werror -std=gnu99 -g " . (join " ", map {"-I$dirpfx$_"} @srcdirs) . " \$(shell \$(GTK_CONFIG) --cflags)"). " -D _FILE_OFFSET_BITS=64\n". @@ -1501,7 +1501,7 @@ if (defined $makefiles{'unix'}) { "\n". "unexport CFLAGS # work around a weird issue with krb5-config\n". "\n". - &splitline("CFLAGS = -O2 -Wall -Werror -g " . + &splitline("CFLAGS = -O2 -Wall -Werror -std=gnu99 -g " . (join " ", map {"-I$dirpfx$_"} @srcdirs)). " -D _FILE_OFFSET_BITS=64\n". "ULDFLAGS = \$(LDFLAGS)\n". @@ -1743,7 +1743,7 @@ if (defined $makefiles{'osx'}) { print "CC = \$(TOOLPATH)gcc\n". "\n". - &splitline("CFLAGS = -O2 -Wall -Werror -g " . + &splitline("CFLAGS = -O2 -Wall -Werror -std=gnu99 -g " . (join " ", map {"-I$dirpfx$_"} @srcdirs))."\n". "MLDFLAGS = -framework Cocoa\n". "ULDFLAGS =\n".