[libXau] cannot compile libXau-0.1.1 on aix: wrong compiler option '-include'

José AUGUSTE-ETIENNE <[email protected]> 25 Mar 2004 10:07:27 -0300
Newsgroups gmane.comp.freedesktop.xlibs.general
Organization CGSS Guyane
Message-ID <1080220047.31285.30.camel@sinf009w>
Hi everybody,

When attempting to build libXau-0.1.1 on aix 4.3.1 with IBM/ANSI-C
compiler VAC 5.0.7,
I got this error

make  all-am
make[1]: Entering directory `/local/temp/src/libXau-0.1.1'
source=3D'AuDispose.c' object=3D'AuDispose.lo' libtool=3Dyes \
depfile=3D'.deps/AuDispose.Plo' tmpdepfile=3D'.deps/AuDispose.TPlo' \
depmode=3Daix /bin/sh ./depcomp \
/bin/sh ./libtool --mode=3Dcompile cc -DHAVE_CONFIG_H -I. -I. -I. =20
-I/local/include -include config.h -I/local/include   -g -c -o
AuDispose.lo `test -f 'AuDispose.c' || echo './'`AuDispose.c
 cc -DHAVE_CONFIG_H -I. -I. -I. -I/local/include -include config.h
-I/local/include -g -c -M AuDispose.c  -DPIC
cc: 1501-218 file config.h contains an incorrect file suffix
make[1]: *** [AuDispose.lo] Error 1
make[1]: Leaving directory `/local/temp/src/libXau-0.1.1'
make: *** [all] Error 2

-I/local/include -include config.h -I/local/include   -g -c -o
                 ^^^^^^^^^^^^^^^^^^
atually '-include' is not a valid compiler option

FWIW, here's the patches I used to remove it from the Makefile
generation

Hope this helps
Jos=C3=A9

*** Makefile.in.orig    Thu Mar 25 09:47:45 2004
--- Makefile.in Thu Mar 25 09:48:35 2004
***************
*** 146,152 ****
  target_alias =3D @target_alias@
  lib_LTLIBRARIES =3D libXau.la
  =20
! AM_CFLAGS =3D -include config.h $(XAU_CFLAGS)
  =20
  libXau_la_LDFLAGS =3D -version-number 0:0:0 -no-undefined
  =20
--- 146,152 ----
  target_alias =3D @target_alias@
  lib_LTLIBRARIES =3D libXau.la
  =20
! AM_CFLAGS =3D $(XAU_CFLAGS)
  =20
  libXau_la_LDFLAGS =3D -version-number 0:0:0 -no-undefined
  =20
*** Makefile.am.orig    Thu Mar 25 09:47:38 2004
--- Makefile.am Thu Mar 25 09:48:22 2004
***************
*** 1,6 ****
  lib_LTLIBRARIES =3D libXau.la
  =20
! AM_CFLAGS=3D-include config.h $(XAU_CFLAGS)
  =20
  libXau_la_LDFLAGS =3D -version-number 0:0:0 -no-undefined
  =20
--- 1,6 ----
  lib_LTLIBRARIES =3D libXau.la
  =20
! AM_CFLAGS=3D $(XAU_CFLAGS)
  =20
  libXau_la_LDFLAGS =3D -version-number 0:0:0 -no-undefined
  =20