autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_TRY_COMPILE() annoyances with 2.63b


From: Mike Frysinger
Subject: AC_TRY_COMPILE() annoyances with 2.63b
Date: Sun, 5 Apr 2009 18:10:14 -0400
User-agent: KMail/1.11.1 (Linux/2.6.28; KDE/4.2.1; x86_64; ; )

after upgrading from 2.63 to 2.63b, i noticed some code configure.ac files 
(like in openssh) results in invalid shell code.  this is because 
AC_TRY_COMPILE() is invoked with an empty 4th argument: [].  i think

specifically, this:
        AC_TRY_COMPILE(
        [
#include <sys/types.h>
#include <shadow.h>
        struct spwd sp;
        ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
        [ sp_expire_available=yes ], []
        )

turned into this:
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <sys/types.h>
#include <shadow.h>
        struct spwd sp;

int
main ()
{
 sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then
   sp_expire_available=yes
else

fi

seems to be fallout of the conversion to using shell functions ... the else 
case previously would always contain at least one statement where autoconf 
internally would echo the build failure to the log file:
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5



fi
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]