- (djm) Workaround PAM inconsistencies between Solaris derived PAM code
   and Linux-PAM. Based on report and fix from Andrew Morgan
   <morgan@transmeta.com>
diff --git a/configure.in b/configure.in
index 9f3b10c..4601cd3 100644
--- a/configure.in
+++ b/configure.in
@@ -88,6 +88,7 @@
 *-*-hpux11*)
 	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
 	IPADDR_IN_DISPLAY=yes
+	AC_DEFINE(PAM_SUN_CODEBASE)
 	AC_DEFINE(USE_PIPES)
 	AC_DEFINE(DISABLE_SHADOW)
 	AC_DEFINE(DISABLE_UTMP)
@@ -149,6 +150,7 @@
 	CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 	LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib -L/usr/ucblib -R/usr/ucblib"
 	need_dash_r=1
+	AC_DEFINE(PAM_SUN_CODEBASE)
 	# hardwire lastlog location (can't detect it on some versions)
 	conf_lastlog_location="/var/adm/lastlog"
 	AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
@@ -164,6 +166,7 @@
 *-*-sunos4*)
 	CPPFLAGS="$CPPFLAGS -DSUNOS4"
 	AC_CHECK_FUNCS(getpwanam)
+	AC_DEFINE(PAM_SUN_CODEBASE)
 	conf_utmp_location=/etc/utmp
 	conf_wtmp_location=/var/adm/wtmp
 	conf_lastlog_location=/var/adm/lastlog
@@ -1614,6 +1617,13 @@
 
 echo ""
 
+if test "x$PAM_MSG" = "xyes" ; then
+	echo "PAM is enabled. You may need to install a PAM control file for sshd,"
+	echo "otherwise password authentication may fail. Example PAM control files"
+	echo "can be found in the contrib/ subdirectory"
+	echo ""
+fi
+
 if test ! -z "$BUILTIN_RNG" ; then
 	echo "WARNING: you are using the builtin random number collection service."
 	echo "Please read WARNING.RNG and request that your OS vendor includes"