[gcc-4.6.2-1-mingw32] [binutils-2.22-1-mingw32] [autoconf2.5-2.68-1-mingw32]
Folks, I tried to build FreeType's current git with the latest minGW bundle on a Windows 7 box, first calling its autogen.sh script, then configuring it. While doing this I got surprising messages on the screen: ... checking size of int result: 0 checking size of long result: 0 ... Looking into config.log, I see this: ====================================================================== configure:4188: checking size of int configure:4193: gcc -o conftest.exe -g -O2 conftest.c >&5 configure:4193: $? = 0 configure:4193: ./conftest.exe ./configure: line 1581: ./conftest.exe: No such file or directory configure:4193: $? = 127 configure: program exited with status 127 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "FreeType" | #define PACKAGE_TARNAME "freetype" | #define PACKAGE_VERSION "2.4.8" | #define PACKAGE_STRING "FreeType 2.4.8" | #define PACKAGE_BUGREPORT "freet...@nongnu.org" | #define PACKAGE_URL "" | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_FCNTL_H 1 | #define HAVE_UNISTD_H 1 | /* end confdefs.h. */ | #include <stdio.h> | #ifdef HAVE_SYS_TYPES_H | # include <sys/types.h> | #endif | #ifdef HAVE_SYS_STAT_H | # include <sys/stat.h> | #endif | #ifdef STDC_HEADERS | # include <stdlib.h> | # include <stddef.h> | #else | # ifdef HAVE_STDLIB_H | # include <stdlib.h> | # endif | #endif | #ifdef HAVE_STRING_H | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | # include <memory.h> | # endif | # include <string.h> | #endif | #ifdef HAVE_STRINGS_H | # include <strings.h> | #endif | #ifdef HAVE_INTTYPES_H | # include <inttypes.h> | #endif | #ifdef HAVE_STDINT_H | # include <stdint.h> | #endif | #ifdef HAVE_UNISTD_H | # include <unistd.h> | #endif | static long int longval () { return (long int) (sizeof (int)); } | static unsigned long int ulongval () { return (long int) (sizeof (int)); } | #include <stdio.h> | #include <stdlib.h> | int | main () | { | | FILE *f = fopen ("conftest.val", "w"); | if (! f) | return 1; | if (((long int) (sizeof (int))) < 0) | { | long int i = longval (); | if (i != ((long int) (sizeof (int)))) | return 1; | fprintf (f, "%ld", i); | } | else | { | unsigned long int i = ulongval (); | if (i != ((long int) (sizeof (int)))) | return 1; | fprintf (f, "%lu", i); | } | /* Do not output a trailing newline, as this causes \r\n confusion | on some platforms. */ | return ferror (f) || fclose (f) != 0; | | ; | return 0; | } configure:4207: result: 0 ====================================================================== And indeed, manually compiling the above snippet with the given compiler flags doesn't result in a binary! If I remove the `-O2' flag it works, and the created `conftest.val' contains `4'. Is this a known issue? It seems to me that -O2 optimizes a bit too much... Werner