Subject: BeroFTPD 1.3.4 configure prob. (HPUX 11.00)

From: "James B. Byrne" <[email-masked]>
Date: Tue, 9 Mar 1999 14:46:44 -0500

I am trying to build BeroFTPD 1.3.4 on HP-UX 11.00 and I am 
getting the following error when running config.

Error received from configure script:

> checking how to determine wtmpx file... configure: error:
> Cannot find out how to locate wtmpx file. Contact
> [email-masked]. 

I have modified the configure.in to test for wtmp in utmp.h 
where the definition for wtmp resides.  The diff patch for 
configure.in is attached.  You will need to have autoconf on 
your system to generate the new configure file.

*** 1.3.4/configure.in  Tue Mar  9 13:24:01 1999
--- hpux11/configure.in Tue Mar  9 13:24:22 1999
***************
*** 606,613 ****
              AC_TRY_COMPILE([#define _GNU_SOURCE
  #include <utmpx.h>], [char *x=WTMP_FILENAME;], 
WTMPX_FILE=WTMP_FILENAME)
              if test "$WTMPX_FILE" = ""; then
!               # some systems REALLY suck...
!               AC_MSG_ERROR(Cannot find out how to locate 
wtmpx file. Contact b
[email-masked].)
              fi
            fi
          fi
--- 606,618 ----
              AC_TRY_COMPILE([#define _GNU_SOURCE
  #include <utmpx.h>], [char *x=WTMP_FILENAME;], 
WTMPX_FILE=WTMP_FILENAME)
              if test "$WTMPX_FILE" = ""; then
!               # This might be HPUX11 you know....
!               AC_TRY_COMPILE([#define _GNU_SOURCE
! #include <utmp.h>], [char *x=WTMP_FILE;], 
WTMPX_FILE=WTMP_FILE, WTMPX_FILE="")

!               if test "$WTMPX_FILE" = ""; then
!                 # some systems REALLY suck...
!                 AC_MSG_ERROR(Cannot find out how to locate 
wtmpx file. Contact
 [email-masked].)
!               fi
              fi
            fi
          fi

This produces a configure script that finds wtmp.  However 
when make is run an error in logwmtp.c occurs at lines 112 
and 113. The error indicates that the e_termination and e_exit 
structures are undefined.  My knowledge of things unix is too 
limited for me to fix this so I offer what I have discovered thus 
far to others that may be able to help complete the puzzle for 
me.

For what it is worth, the hpux 11.00 man pages on utmpx 
caution against modifying the utmp and utmpx files directly 
and direct programmers to use the pututline and pututxline 
constructs instead.  Both of these are notably absent from the 
files in src.

Regards,
Jim

---
James B. Byrne                Harte & Lyne Limited
vox: +1 905 561 1241          9 Brockley Drive
fax: +1 905 561 0757          Hamilton, Ontario
mailto:[email-masked]  Canada L8E 3C3