[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_CHECK_FUNCS difference between 2.54 and 2.56
From: |
Albert Chin |
Subject: |
AC_CHECK_FUNCS difference between 2.54 and 2.56 |
Date: |
Fri, 29 Nov 2002 19:16:40 -0600 |
User-agent: |
Mutt/1.2.5i |
There seem to be problems with AC_CHECK_FUNCS on AIX with the IBM C
compiler (5.0.2.6). With autoconf 2.54, AC_CHECK_FUNCS(chflags)
outputs (b.c):
...
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
char (*f) ();
int
main ()
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
f = $ac_func;
#endif
;
return 0;
}
_ACEOF
...
Autoconf 2.56 outputs (c.c):
...
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
char (*f) () = $ac_func;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
;
return 0;
}
_ACEOF
The problem is that chflags doesn't exist on AIX yet the test passes
because the IBM linker seems to optimize the call out:
$ xlc -v b.c
exec:
/usr/vac/exe/xlcentry(xlcentry,-D_AIX,-D_AIX32,-D_AIX41,-D_AIX43,-D_IBMR2,-D_POWER,-qansialias,-ob.o,b.c,/tmp/xlcW01ctrMa,/tmp/xlcW11ctrMb,/dev/null,b.lst,c,/tmp/xlcW21ctrMc,NULL)
exec:
/usr/vac/exe/xlCcode(xlCcode,-qansialias,/tmp/xlcW01ctrMa,/tmp/xlcW11ctrMb,b.o,b.lst,/tmp/xlcW21ctrMc,NULL)
exec: /bin/ld(ld,/lib/crt0.o,-bpT:0x10000000,-bpD:0x20000000,b.o,-lc,NULL)
unlink: b.o
unlink: /tmp/xlcW01ctrMa
unlink: /tmp/xlcW11ctrMb
unlink: /tmp/xlcW21ctrMc
$ xlc -v c.c
exec:
/usr/vac/exe/xlcentry(xlcentry,-D_AIX,-D_AIX32,-D_AIX41,-D_AIX43,-D_IBMR2,-D_POWER,-qansialias,-oc.o,c.c,/tmp/xlcW0Xytrya,/tmp/xlcW1Xytryb,/dev/null,c.lst,b,/tmp/xlcW2Xytryc,NULL)
exec:
/usr/vac/exe/xlCcode(xlCcode,-qansialias,/tmp/xlcW0Xytrya,/tmp/xlcW1Xytryb,c.o,c.lst,/tmp/xlcW2Xytryc,NULL)
exec: /bin/ld(ld,/lib/crt0.o,-bpT:0x10000000,-bpD:0x20000000,c.o,-lc,NULL)
ld: 0711-317 ERROR: Undefined symbol: chflags
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
unlink: /tmp/xlcW0Xytrya
unlink: /tmp/xlcW1Xytryb
unlink: /tmp/xlcW2Xytryc
So, can we go back to 2.54 behaviour?
--
albert chin (address@hidden)
- AC_CHECK_FUNCS difference between 2.54 and 2.56,
Albert Chin <=