From xemacs-m  Tue Dec 17 20:17:03 1996
Received: from venus.Sun.COM (venus.Sun.COM [192.9.25.5])
          by xemacs.cs.uiuc.edu (8.8.4/8.8.4) with SMTP
	  id UAA01717 for <xemacs-beta@xemacs.org>; Tue, 17 Dec 1996 20:17:02 -0600 (CST)
Received: from Eng.Sun.COM ([129.146.1.25]) by venus.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id SAA29794; Tue, 17 Dec 1996 18:16:27 -0800
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id SAA03536; Tue, 17 Dec 1996 18:16:26 -0800
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id SAA18220; Tue, 17 Dec 1996 18:16:24 -0800
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id SAA12680; Tue, 17 Dec 1996 18:16:23 -0800
Date: Tue, 17 Dec 1996 18:16:23 -0800
Message-Id: <199612180216.SAA12680@xemacs.eng.sun.com>
From: Martin Buchholz <mrb@Eng.Sun.COM>
To: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor])
Cc: xemacs-beta@xemacs.org
Subject: configure failure on AIX
In-Reply-To: <y9lwwuho9b3.fsf@modas.informatik.uni-tuebingen.de>
References: <y9lwwuho9b3.fsf@modas.informatik.uni-tuebingen.de>
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>
Mime-Version: 1.0 (generated by tm-edit 7.94)
Content-Type: text/plain; charset=US-ASCII

>>>>> "Mr.P" == Michael Sperber [Mr Preprocessor] <sperber@informatik.uni-tuebingen.de> writes:

Mr.P> It seems there's a real bug in the configure script; without it, even
Mr.P> /bin/ksh on 4.1.4 runs configure fine.

Mr.P> configure.in has this code:

Mr.P> # AIX export list
Mr.P> for export in /usr/lpp/X11/bin/smt.exp /usr/bin/X11/smt.exp ; do
Mr.P>   if test -f "$export" ; then
Mr.P>     AC_DEFINE(AIX_SMT_EXP, -bI:$export)
Mr.P>     break
Mr.P>   fi
Mr.P> done

That helps.  The bug is that variables cannot be specified inside an
AC_DEFINE.  This patch (untested) looks like it will work:

    *** /tmp/geta20902	Tue Dec 17 18:12:38 1996
--- configure.in	Tue Dec 17 18:13:08 1996
***************
*** 2770,2781 ****
  AC_HEADER_CHECK(nlist.h, AC_DEFINE(NLIST_STRUCT), )
  
  # AIX export list
! for export in /usr/lpp/X11/bin/smt.exp /usr/bin/X11/smt.exp ; do
!   if test -f "$export" ; then
!     AC_DEFINE(AIX_SMT_EXP, -bI:$export)
!     break
!   fi
! done
  
  dnl # Set up the CFLAGS for real compilation, so we can substitute it.
  CFLAGS="$REAL_CFLAGS"
--- 2770,2780 ----
  AC_HEADER_CHECK(nlist.h, AC_DEFINE(NLIST_STRUCT), )
  
  # AIX export list
! if test -f /usr/lpp/X11/bin/smt.exp ; then
!   AC_DEFINE(AIX_SMT_EXP, -bI:/usr/lpp/X11/bin/smt.exp)
! elif test -f /usr/bin/X11/smt.exp ; then
!   AC_DEFINE(AIX_SMT_EXP, -bI:/usr/bin/X11/smt.exp)
! fi
  
  dnl # Set up the CFLAGS for real compilation, so we can substitute it.
  CFLAGS="$REAL_CFLAGS"

