Subject: FVWM: configure broken with 2.5.5

From: Tomi Vainio - Sun Finland <[email-masked]>
Date: Sat, 22 Feb 2003 21:08:16 +0200

If I do "CC=cc ./configure" with 2.5.5 I get an error but this still
works with 2.4.15.

checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
configure: error: "
configure is not able to compile programs with warnings.  Please
remove all offending options like -Werror from the CFLAGS and
CPPFLAGS variables and run configure again."

  Tomppa
---clip clip---
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.53.  Invocation command line was

  $ ./configure 

## --------- ##
## Platform. ##
## --------- ##

hostname = ultrahot
uname -m = sun4u
uname -r = 5.9
uname -s = SunOS
uname -v = Generic_112233-04

/usr/bin/uname -p = sparc
/bin/uname -X     = System = SunOS
Node = ultrahot
Release = 5.9
KernelID = Generic_112233-04
Machine = sun4u
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 2

/bin/arch              = sun4
/usr/bin/arch -k       = sun4u
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /home/tomppa/bin
PATH: /usr/local/binf
PATH: /usr/local/binp
PATH: /usr/local/bin
PATH: /usr/local/binc
PATH: /usr/local/bin/X11
PATH: /opt/gnu/bin
PATH: /usr/dt/bin
PATH: /usr/openwin/bin
PATH: /usr/X11R6/bin
PATH: /opt/SUNWspro/bin
PATH: /usr/ccs/bin
PATH: /sbin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /usr/ucb
PATH: /usr/lib/lp/postscript
PATH: /usr/dist/local/exe
PATH: /usr/dist/exe
PATH: .

## ----------- ##
## Core tests. ##
## ----------- ##

configure:1359: checking for a BSD-compatible install
configure:1413: result: /usr/ucb/install
configure:1424: checking whether build environment is sane
configure:1467: result: yes
configure:1500: checking for gawk
configure:1516: found /usr/local/bin/gawk
configure:1526: result: gawk
configure:1536: checking whether make sets ${MAKE}
configure:1556: result: yes
configure:1746: checking whether to enable command logging
configure:1764: result: no
configure:1769: checking whether to enable debugging messages
configure:1787: result: no
configure:1792: checking whether to enable fancy pixmap titlebars
configure:1810: result: yes
configure:1818: checking imagepath
configure:1844: result: /usr/include/X11/bitmaps:/usr/include/X11/pixmaps
configure:1893: checking for gcc
configure:1919: result: cc
configure:2163: checking for C compiler version
configure:2166: cc --version </dev/null >&5
cc: Warning: option -- passed to ld
usage: cc [ options] files.  Use 'cc -flags' for details
configure:2169: $? = 1
configure:2171: cc -v </dev/null >&5
usage: cc [ options] files.  Use 'cc -flags' for details
configure:2174: $? = 1
configure:2176: cc -V </dev/null >&5
cc: Forte Developer 7 C 5.4 2002/03/09
usage: cc [ options] files.  Use 'cc -flags' for details
configure:2179: $? = 1
configure:2205: checking for C compiler default output
configure:2208: cc    conftest.c  >&5
configure:2211: $? = 0
configure:2244: result: a.out
configure:2249: checking whether the C compiler works
configure:2255: ./a.out
configure:2258: $? = 0
configure:2273: result: yes
configure:2280: checking whether we are cross compiling
configure:2282: result: no
configure:2285: checking for suffix of executables
configure:2287: cc -o conftest    conftest.c  >&5
configure:2290: $? = 0
configure:2312: result: 
configure:2318: checking for suffix of object files
configure:2342: cc -c   conftest.c >&5
configure:2345: $? = 0
configure:2364: result: o
configure:2368: checking whether we are using the GNU C compiler
configure:2395: cc -c   conftest.c >&5
"configure", line 2385: undefined symbol: choke
"configure", line 2385: syntax error before or at: me
cc: acomp failed for conftest.c
configure:2398: $? = 2
configure: failed program was:
#line 2373 "configure"
#include "confdefs.h"

#ifdef F77_DUMMY_MAIN
#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
configure:2416: result: no
configure:2422: checking whether cc accepts -g
configure:2446: cc -c -g  conftest.c >&5
configure:2449: $? = 0
configure:2452: test -s conftest.o
configure:2455: $? = 0
configure:2465: result: yes
configure:2492: cc -c -g  conftest.c >&5
"conftest.c", line 2: warning: old-style declaration or incorrect type for: choke
"conftest.c", line 2: syntax error before or at: me
"conftest.c", line 3: warning: old-style declaration or incorrect type for: me
cc: acomp failed for conftest.c
configure:2495: $? = 2
configure: failed program was:
#ifndef __cplusplus
  choke me
#endif
configure:2624: checking for style of include used by make
configure:2652: result: GNU
configure:2680: checking dependency style of cc
configure:2742: result: none
configure:2752: checking how to run the C preprocessor
configure:2778: cc -E  conftest.c
configure:2784: $? = 0
configure:2811: cc -E  conftest.c
"configure", line 2807: cannot find include file: <ac_nonexistent.h>
cc: acomp failed for conftest.c
configure:2817: $? = 2
configure: failed program was:
#line 2806 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
configure:2854: result: cc -E
configure:2869: cc -E  conftest.c
configure:2875: $? = 0
configure:2902: cc -E  conftest.c
"configure", line 2898: cannot find include file: <ac_nonexistent.h>
cc: acomp failed for conftest.c
configure:2908: $? = 2
configure: failed program was:
#line 2897 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
configure:2953: checking for library containing strerror
configure:2986: cc -o conftest -g   conftest.c  >&5
configure:2989: $? = 0
configure:2992: test -s conftest
configure:2995: $? = 0
configure:3054: result: none required
configure:3062: checking for ANSI C header files
configure:3076: cc -E  conftest.c
configure:3082: $? = 0
configure:3167: cc -o conftest -g   conftest.c  >&5
"configure", line 3160: warning: implicit function declaration: exit
configure:3170: $? = 0
configure:3172: ./conftest
configure:3175: $? = 0
configure:3189: result: yes
configure:3213: checking for sys/types.h
configure:3226: cc -c -g  conftest.c >&5
configure:3229: $? = 0
configure:3232: test -s conftest.o
configure:3235: $? = 0
configure:3245: result: yes
configure:3213: checking for sys/stat.h
configure:3226: cc -c -g  conftest.c >&5
configure:3229: $? = 0
configure:3232: test -s conftest.o
configure:3235: $? = 0
configure:3245: result: yes
configure:3213: checking for stdlib.h
configure:3226: cc -c -g  conftest.c >&5
configure:3229: $? = 0
configure:3232: test -s conftest.o
configure:3235: $? = 0
configure:3245: result: yes
configure:3213: checking for string.h
configure:3226: cc -c -g  conftest.c >&5
configure:3229: $? = 0
configure:3232: test -s conftest.o
configure:3235: $? = 0
configure:3245: result: yes
configure:3213: checking for memory.h
configure:3226: cc -c -g  conftest.c >&5
configure:3229: $? = 0
configure:3232: test -s conftest.o
configure:3235: $? = 0
configure:3245: result: yes
configure:3213: checking for strings.h
configure:3226: cc -c -g  conftest.c >&5
configure:3229: $? = 0
configure:3232: test -s conftest.o
configure:3235: $? = 0
configure:3245: result: yes
configure:3213: checking for inttypes.h
configure:3226: cc -c -g  conftest.c >&5
configure:3229: $? = 0
configure:3232: test -s conftest.o
configure:3235: $? = 0
configure:3245: result: yes
configure:3213: checking for stdint.h
configure:3226: cc -c -g  conftest.c >&5
"configure", line 3254: cannot find include file: <stdint.h>
cc: acomp failed for conftest.c
configure:3229: $? = 2
configure: failed program was:
#line 3218 "configure"
#include "confdefs.h"
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
#  include <stdlib.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
#  include <stdint.h>
# endif
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif

#include <stdint.h>
configure:3245: result: no
configure:3213: checking for unistd.h
configure:3226: cc -c -g  conftest.c >&5
configure:3229: $? = 0
configure:3232: test -s conftest.o
configure:3235: $? = 0
configure:3245: result: yes
configure:3267: checking minix/config.h usability
configure:3276: cc -c -g  conftest.c >&5
"configure", line 3304: cannot find include file: <minix/config.h>
cc: acomp failed for conftest.c
configure:3279: $? = 2
configure: failed program was:
#line 3269 "configure"
#include "confdefs.h"
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
#  include <stdlib.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
#  include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
#  include <stdint.h>
# endif
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <minix/config.h>
configure:3294: result: no
configure:3298: checking minix/config.h presence
configure:3305: cc -E  conftest.c
"configure", line 3301: cannot find include file: <minix/config.h>
cc: acomp failed for conftest.c
configure:3311: $? = 2
configure: failed program was:
#line 3300 "configure"
#include "confdefs.h"
#include <minix/config.h>
configure:3329: result: no
configure:3347: checking for minix/config.h
configure:3354: result: no
configure:3408: cc -c -g  conftest.c >&5
"configure", line 3395: syntax error before or at: {
"configure", line 3397: warning: improper pointer/integer combination: op "="
"configure", line 3397: warning: improper pointer/integer combination: op "="
"configure", line 3398: undefined symbol: i
"configure", line 3398: warning: improper pointer/integer combination: op "="
"configure", line 3398: warning: assignment type mismatch:
	pointer to char "=" pointer to int
"configure", line 3400: warning: statement not reached
"configure", line 3400: warning: function expects to return value: main
"configure", line 3401: warning: syntax error:  empty declaration
"configure", line 3402: syntax error before or at: return
"configure", line 3402: warning: syntax error:  empty declaration
cc: acomp failed for conftest.c
configure:3411: $? = 2
configure: failed program was:
#line 3384 "configure"
#include "confdefs.h"
#include <stdio.h>
#ifdef F77_DUMMY_MAIN
#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
int warn(void) {
  int i; static j; int *p; char *c;
  switch (*p = p = *c) { case 0: printf("%Q", c, p); }
  *c = &i; c = p;
  while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1));
  return; }
  ;
  return 0;
}
configure:3426: error: "
configure is not able to compile programs with warnings.  Please
remove all offending options like -Werror from the CFLAGS and
CPPFLAGS variables and run configure again."

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_c_compiler_gnu=no
ac_cv_dmalloc=no
ac_cv_efence=no
ac_cv_env_CC_set=set
ac_cv_env_CC_value=cc
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_minix_config_h=no
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=no
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_objext=o
ac_cv_prog_AWK=gawk
ac_cv_prog_CPP=$'cc -E'
ac_cv_prog_ac_ct_CC=cc
ac_cv_prog_cc_g=yes
ac_cv_prog_make_make_set=yes
ac_cv_search_strerror=$'none required'
am_cv_CC_dependencies_compiler_type=none

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define VERSIONINFO ""
#define PACKAGE "fvwm"
#define VERSION "2.5.5"
#define FANCY_TITLEBARS 1
#define FVWM_IMAGEPATH "/usr/include/X11/bitmaps:/usr/include/X11/pixmaps"
#define STDC_HEADERS 1
#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_UNISTD_H 1

configure: exit 1
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dan Espen <[email-masked]>
Date: Sat, 22 Feb 2003 14:37:39 -0500

> If I do "CC=cc ./configure" with 2.5.5 I get an error but this still
...
> generated by GNU Autoconf 2.53.  Invocation command line was

The problem is that 2.5.5 was created with
autoconf 2.53 where 2.4.15 used something earlier.

The nightly snapshots are generated with 2.13,
so they should work fine.

Will you contact the autoconf developers?

-- 
Dan Espen                           E-mail: [email-masked]

---

From: Tomi Vainio - Sun Finland <[email-masked]>
Date: Sat, 22 Feb 2003 22:26:28 +0200

> Will you contact the autoconf developers?
If you know what is the problem it might be much better if you contact
them.

  Tomppa

---

From: Dan Espen <[email-masked]>
Date: Sat, 22 Feb 2003 15:37:13 -0500

> If you know what is the problem it might be much better if you contact

I don't really understand the ins and outs.

This is the code:

#include <stdio.h>
#ifdef F77_DUMMY_MAIN
#  ifdef __cplusplus
     extern "C"
#  endif

I think they want it to generate a warning.
It does with gcc.
With forte 6.2 on my Solaris 8 machine, it generates an error:

fork> cc x.c 
"x.c", line 11: syntax error before or at: {

Line 11 is:

int warn(void) {

I really don't know what that is.
It looks like a function within a function.
Thats what gcc seems to treat it as:

fork> gcc x.c 
x.c: In function `warn':
x.c:13: warning: assignment makes pointer from integer without a cast
x.c:13: warning: assignment makes integer from pointer without a cast
x.c:14: warning: assignment makes integer from pointer without a cast
x.c:14: warning: assignment from incompatible pointer type

Maybe someone else on the list can clarify.

---

From: Ben Winslow <[email-masked]>
Date: Sat, 22 Feb 2003 16:45:32 -0500

> Maybe someone else on the list can clarify.

After a little experimentation and research, it seems that nested 
functions are forbidden by ISO C but allowed by ANSI (resulting in 
functions with limited scope.)  gcc will generate a warning about the 
nested function if you compile with -pedantic; Forte is notorious for 
being pedantic all the time ;)

Anyway, the actual test is defined in configure.in:

dnl catch -Werror and similar options when running configure
AC_TRY_COMPILE([#include <stdio.h>],
[int warn(void) {
   int i; static j; int *p; char *c;
   switch (*p = p = *c) { case 0: printf("%Q", c, p); }
   *c = &i; c = p;
   while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1));
   return; }], , AC_MSG_ERROR("
configure is not able to compile programs with warnings.  Please
remove all offending options like -Werror from the CFLAGS and
CPPFLAGS variables and run configure again."))

According to the autoconf manual, only the function body is supposed to 
be passed as the second argument--the function declaration itself ('int 
warn(void) {') should be dropped, and that will hopefully fix the 
problem.  I don't have a Solaris box to test that on, though.

-- 
Ben

---

From: Dan Espen <[email-masked]>
Date: Sat, 22 Feb 2003 16:45:54 -0500

> I don't really understand the ins and outs.

OK, I sent some mail to the autoconf folks.
I'll keep you posted.
I see the same problem with autoconf 2.57.

---

From: Dan Espen <[email-masked]>
Date: Sat, 22 Feb 2003 17:00:17 -0500

Ben Winslow <[email-masked]> writes:
> This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
> --------------enigD8DAD9F42323ACF870F5E6DA
> Content-Type: text/plain; charset=us-ascii; format=flowed
> Content-Transfer-Encoding: 7bit
> 
> Dan Espen wrote:
> > fork> gcc x.c 
> > x.c: In function `warn':

Thanks Ben.

Guess I've been fooled by configure again.

---

From: "Paul Smith" <[email-masked]>
Date: 22 Feb 2003 17:57:23 -0500

%% Ben Winslow <[email-masked]> writes:

  bw> After a little experimentation and research, it seems that nested
  bw> functions are forbidden by ISO C but allowed by ANSI

Not sure where you get this: no C standard I've ever seen (ANSI or ISO)
has ever allowed nested function definitions.

There is a GCC-specific extension that allows them; I don't know which,
if any, other compilers might also provide this extension.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>   HASMAT--HA Software Mthds & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: "Paul Smith" <[email-masked]>
Date: 22 Feb 2003 18:04:05 -0500

%% Dan Espen <[email-masked]> writes:

  de> Guess I've been fooled by configure again.

Oh that rude autoconf, behaving exactly as described in its manual yet
again!!  How tiresome!

:)

In this case you actually got fooled by GCC, which has this
super-advanced extension that made what is unquestionably a syntax error
in any standard compiler, only a warning in GCC.  The moral of the story
is that when it comes to portability, autoconf is no panacea and no
substitute for actually trying it on lots of different systems and with
lots of different compilers.  At least two of each, anyway :).

I know that can be difficult these days where GCC is so prevalent and
most anything else costs $$...

---

From: Dan Espen <[email-masked]>
Date: Sat, 22 Feb 2003 21:41:04 -0500

I'm going to guess you had something to do with the manual.

 :)

I just read the description at:

http://www.gnu.org/manual/autoconf/html_mono/autoconf.html

and I understand it now, but I'm sure it didn't sink in
the first time.  Unlike the gnumake manual, (which is great),
there's no example.

> in any standard compiler, only a warning in GCC.

I didn't know about GCC, but my bigger problem was
I thought the code was coming
from autoconf.  When I went looking for the code in configure.in
I was searching for the f77 part of the code.  Since its not in
stuff generated by autoconf 2.13, I guessed the whole test was
coming from autoconf.

I know, my understanding of autoconf macros is abysmal,
but I think I'm improving.

> The moral of the story

I think different versions of autoconf is an issue too.
2.57 is complaining about our input files, but it seems to work.

I just updated the notes I keep about preparing releases to
tell myself to do a compile with Sun's compiler before release.
Seems like a good idea with gcc having weird extensions.

Thanks.

---

From: [email-masked]
Date: Mon, 24 Feb 2003 00:26:31 +0100

> Maybe someone else on the list can clarify.

Um, does this Chnagelog entry ring a bell?

  2002-09-18  Dominik Vogt  <[email-masked]>

	* configure.in:
	added a program that tests for -Werror option and similar; bug out of
	configure if the test program doesn't compile

We discussed this a while ago to provide a better error message
when configure is run with -Werror in the CFLAGS.  I don't
remember exactly, but I asked for a valid program with several
warnings on the list and included it in confiure.in.  That has
nothing to do with autoconf.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].