Russell Ruby
2006-Jun-29 16:05 UTC
SunOS 4.1.4 "configure: WARNING" for sys/audit.h and sys/dir.h
Openssh: openssh-SNAP-20060626 and openssh-4.3p2 System: SunOS 4.1.4 Compiler: gcc 2.8.1 CONFIGURE PROBLEM: The warnings included below occur because of missing include files for each compilation test. Specifically: sys/audit.h needs sys/types.h and sys/label.h sys/dir.h needs sys/types.h PARTIAL FIX: Most of the machinery for the sys/types.h dependency is already present. One possibility is to add the line "AC_DEFINE(HAVE_SYS_TYPES_H)" to "configure.ac" as follows for openssh-SNAP-20060626/configure.ac: 429 *-*-sunos4*) 430 CPPFLAGS="$CPPFLAGS -DSUNOS4" 431 AC_CHECK_FUNCS(getpwanam) 432 AC_DEFINE(PAM_SUN_CODEBASE) + add this + AC_DEFINE(HAVE_SYS_TYPES_H) 433 conf_utmp_location=/etc/utmp 434 conf_wtmp_location=/var/adm/wtmp 435 conf_lastlog_location=/var/adm/lastlog 436 AC_DEFINE(USE_PIPES) 437 ;; However, the sys/label.h dependency would take a bit more and I'm in no hurry to trip over sys/audit.h and sys/labels.h anyway... Hey - I know SunOS4.1.4 is busted - but it still works for me :) CONFIGURE WARNINGS: checking sys/audit.h usability... no checking sys/audit.h presence... yes configure: WARNING: sys/audit.h: present but cannot be compiled configure: WARNING: sys/audit.h: check for missing prerequisite headers? configure: WARNING: sys/audit.h: see the Autoconf documentation configure: WARNING: sys/audit.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/audit.h: proceeding with the preprocessor's result configure: WARNING: sys/audit.h: in the future, the compiler will take precedence configure: WARNING: ## ------------------------------------------- ## configure: WARNING: ## Report this to openssh-unix-dev at mindrot.org ## configure: WARNING: ## ------------------------------------------- ## checking for sys/audit.h... yes ... checking sys/dir.h usability... no checking sys/dir.h presence... yes configure: WARNING: sys/dir.h: present but cannot be compiled configure: WARNING: sys/dir.h: check for missing prerequisite headers? configure: WARNING: sys/dir.h: see the Autoconf documentation configure: WARNING: sys/dir.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/dir.h: proceeding with the preprocessor's result configure: WARNING: sys/dir.h: in the future, the compiler will take precedence configure: WARNING: ## ------------------------------------------- ## configure: WARNING: ## Report this to openssh-unix-dev at mindrot.org ## configure: WARNING: ## ------------------------------------------- ## checking for sys/dir.h... yes
Darren Tucker
2006-Jun-30 01:33 UTC
SunOS 4.1.4 "configure: WARNING" for sys/audit.h and sys/dir.h
On Thu, Jun 29, 2006 at 09:05:12AM -0700, Russell Ruby wrote:> > Openssh: openssh-SNAP-20060626 and openssh-4.3p2 > System: SunOS 4.1.4 > Compiler: gcc 2.8.1 > > CONFIGURE PROBLEM: > The warnings included below occur because of missing include files for each > compilation test. > > Specifically: > sys/audit.h needs sys/types.h and sys/label.h > sys/dir.h needs sys/types.h > > > PARTIAL FIX: > > Most of the machinery for the sys/types.h dependency is already present. > One possibility is to add the line "AC_DEFINE(HAVE_SYS_TYPES_H)" to > "configure.ac" as follows for openssh-SNAP-20060626/configure.ac: > > 429 *-*-sunos4*) > 430 CPPFLAGS="$CPPFLAGS -DSUNOS4" > 431 AC_CHECK_FUNCS(getpwanam) > 432 AC_DEFINE(PAM_SUN_CODEBASE) > + add this + AC_DEFINE(HAVE_SYS_TYPES_H)That's odd, <sys/types.h> is one of the first tests autoconf does so it should already be defined. Do you see "checking for sys/types.h..." near the start of the configure output? As for the rest, does the following resolve it? Index: configure.ac ==================================================================RCS file: /var/cvs/openssh/configure.ac,v retrieving revision 1.343 diff -u -p -r1.343 configure.ac --- configure.ac 27 Jun 2006 01:20:29 -0000 1.343 +++ configure.ac 30 Jun 2006 01:29:18 -0000 @@ -705,11 +705,11 @@ AC_CHECK_HEADERS( \ stdint.h \ string.h \ strings.h \ - sys/audit.h \ sys/bitypes.h \ sys/bsdtty.h \ sys/cdefs.h \ sys/dir.h \ + sys/label.h \ sys/mman.h \ sys/ndir.h \ sys/prctl.h \ @@ -752,6 +752,16 @@ AC_CHECK_HEADERS(sys/ptms.h, [], [], [ # login_cap.h requires sys/types.h on NetBSD AC_CHECK_HEADERS(login_cap.h, [], [], [ #include <sys/types.h> +]) + +# sys/audit.h requires sys/types.h and sys/label.h on SunOS4 +AC_CHECK_HEADERS(sys/audit.h, [], [], [ +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_LABEL_H +# include <sys/label.h> +#endif ]) # Checks for libraries. -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.