samba-cvs.cvs
[Top] [All Lists]

svn commit: samba r22049 - in branches: SAMBA_3_0/source SAMBA_3_0/sourc

Subject: svn commit: samba r22049 - in branches: SAMBA_3_0/source SAMBA_3_0/source/include SAMBA_3_0_25/source SAMBA_3_0_25/source/include
From:
Date: Mon, 2 Apr 2007 23:07:07 +0000 GMT
Author: jra
Date: 2007-04-02 23:07:06 +0000 (Mon, 02 Apr 2007)
New Revision: 22049

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22049

Log:
HPUX build fixes from <don.mccall@xxxxxx>.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/include/includes.h
   branches/SAMBA_3_0_25/source/configure.in
   branches/SAMBA_3_0_25/source/include/includes.h


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===================================================================
--- branches/SAMBA_3_0/source/configure.in      2007-04-02 21:26:32 UTC (rev 
22048)
+++ branches/SAMBA_3_0/source/configure.in      2007-04-02 23:07:06 UTC (rev 
22049)
@@ -608,7 +608,6 @@
 # case statement; its first reference must be unconditional.
 #
 case "$host_os" in
-# Try to work out if this is the native HPUX compiler that uses the -Ae flag.
     *hpux*)
 #
 # Defines needed for HPUX support.
@@ -1769,14 +1768,15 @@
                        ;;
                *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
                        # Use special PIC flags for the native HP-UX compiler.
-                       if test $ac_cv_prog_cc_Ae = yes; then
                                BLDSHARED="true"
                                SHLD="cc"
                                LDSHFLAGS="-b -Wl,-B,symbolic,-b,-z"
                                SONAMEFLAG="-Wl,+h "
                                PICFLAG="+z"
-                       elif test "${GCC}" = "yes"; then
+                       if test "${GCC}" = "yes"; then
                                PICFLAG="-fPIC"
+                       else 
+                               PICFLAG="+z"
                        fi
                        if test "$host_cpu" = "ia64"; then
                                SHLIBEXT="so"
@@ -3193,16 +3193,26 @@
   fi
 
   ##################################################################
-  # HP/UX does not have ber_tag_t, disable LDAP there
-  AC_CHECK_TYPE(ber_tag_t,,,[#include <lber.h>])
-  if test x"$ac_cv_type_ber_tag_t" != x"yes"; then
-       if test x"$with_ldap_support" = x"yes"; then
-        AC_MSG_ERROR(ber_tag_t is needed for LDAP support)
-       else
+  # HP/UX does not have ber_tag_t in lber.h - it must be configured as
+  # unsigned int in include/includes.h
+  case $host_os in
+       *hpux*)
         AC_MSG_WARN(ber_tag_t is needed for LDAP support)
-       fi
-       with_ldap_support=no
-  fi
+        AC_MSG_WARN(ber_tag_t must be configured in includes.h for hpux)
+       with_ldap_support=yes
+       ;;
+       *)
+       AC_CHECK_TYPE(ber_tag_t,,,[#include <lber.h>])
+       if test x"$ac_cv_type_ber_tag_t" != x"yes"; then
+               if test x"$with_ldap_support" = x"yes"; then
+               AC_MSG_ERROR(ber_tag_t is needed for LDAP support)
+               else
+               AC_MSG_WARN(ber_tag_t is needed for LDAP support)
+               fi
+               with_ldap_support=no
+       fi
+       ;;
+  esac
 fi
 
 if test x"$with_ldap_support" != x"no"; then
@@ -3300,6 +3310,21 @@
     # Check to see whether there is enough LDAP functionality to be able
     # to build AD support.
 
+# HPUX only has ldap_init; ok, we take care of this in smbldap.c
+case "$host_os" in
+       *hpux*)
+    AC_CHECK_FUNC_EXT(ldap_init,$LDAP_LIBS)
+
+    if test x"$ac_cv_func_ext_ldap_init" != x"yes"; then
+       if test x"$with_ads_support" = x"yes"; then
+           AC_MSG_ERROR(Active Directory support on HPUX requires ldap_init)
+       elif test x"$with_ads_support" = x"auto"; then
+           AC_MSG_WARN(Disabling Active Directory support (requires ldap_init 
on HPUX))
+           with_ads_support=no
+       fi
+    fi
+    ;;
+       *)
     AC_CHECK_FUNC_EXT(ldap_initialize,$LDAP_LIBS)
 
     if test x"$ac_cv_func_ext_ldap_initialize" != x"yes"; then
@@ -3310,7 +3335,10 @@
            with_ads_support=no
        fi
     fi
+    ;;
+esac
 
+
     AC_CHECK_FUNC_EXT(ldap_add_result_entry,$LDAP_LIBS)
 
     if test x"$ac_cv_func_ext_ldap_add_result_entry" != x"yes"; then

Modified: branches/SAMBA_3_0/source/include/includes.h
===================================================================
--- branches/SAMBA_3_0/source/include/includes.h        2007-04-02 21:26:32 UTC 
(rev 22048)
+++ branches/SAMBA_3_0/source/include/includes.h        2007-04-02 23:07:06 UTC 
(rev 22049)
@@ -173,6 +173,15 @@
 
 #if HAVE_LBER_H
 #include <lber.h>
+#ifdef HPUX
+/* Define ber_tag_t and ber_int_t for using
+ * HP LDAP-UX Integration products' LDAP libraries.
+*/
+#ifndef ber_tag_t
+typedef unsigned int ber_tag_t;
+typedef unsigned int ber_int_t;
+#endif
+#endif /* HPUX */
 #ifndef LBER_USE_DER
 #define LBER_USE_DER 0x01
 #endif

Modified: branches/SAMBA_3_0_25/source/configure.in
===================================================================
--- branches/SAMBA_3_0_25/source/configure.in   2007-04-02 21:26:32 UTC (rev 
22048)
+++ branches/SAMBA_3_0_25/source/configure.in   2007-04-02 23:07:06 UTC (rev 
22049)
@@ -605,7 +605,6 @@
 # case statement; its first reference must be unconditional.
 #
 case "$host_os" in
-# Try to work out if this is the native HPUX compiler that uses the -Ae flag.
     *hpux*)
 #
 # Defines needed for HPUX support.
@@ -1765,14 +1764,15 @@
                        ;;
                *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
                        # Use special PIC flags for the native HP-UX compiler.
-                       if test $ac_cv_prog_cc_Ae = yes; then
                                BLDSHARED="true"
                                SHLD="cc"
                                LDSHFLAGS="-b -Wl,-B,symbolic,-b,-z"
                                SONAMEFLAG="-Wl,+h "
                                PICFLAG="+z"
-                       elif test "${GCC}" = "yes"; then
+                       if test "${GCC}" = "yes"; then
                                PICFLAG="-fPIC"
+                       else 
+                               PICFLAG="+z"
                        fi
                        if test "$host_cpu" = "ia64"; then
                                SHLIBEXT="so"
@@ -3184,16 +3184,26 @@
   fi
 
   ##################################################################
-  # HP/UX does not have ber_tag_t, disable LDAP there
-  AC_CHECK_TYPE(ber_tag_t,,,[#include <lber.h>])
-  if test x"$ac_cv_type_ber_tag_t" != x"yes"; then
-       if test x"$with_ldap_support" = x"yes"; then
-        AC_MSG_ERROR(ber_tag_t is needed for LDAP support)
-       else
+  # HP/UX does not have ber_tag_t in lber.h - it must be configured as
+  # unsigned int in include/includes.h
+  case $host_os in
+       *hpux*)
         AC_MSG_WARN(ber_tag_t is needed for LDAP support)
-       fi
-       with_ldap_support=no
-  fi
+        AC_MSG_WARN(ber_tag_t must be configured in includes.h for hpux)
+       with_ldap_support=yes
+       ;;
+       *)
+       AC_CHECK_TYPE(ber_tag_t,,,[#include <lber.h>])
+       if test x"$ac_cv_type_ber_tag_t" != x"yes"; then
+               if test x"$with_ldap_support" = x"yes"; then
+               AC_MSG_ERROR(ber_tag_t is needed for LDAP support)
+               else
+               AC_MSG_WARN(ber_tag_t is needed for LDAP support)
+               fi
+               with_ldap_support=no
+       fi
+       ;;
+  esac
 fi
 
 if test x"$with_ldap_support" != x"no"; then
@@ -3285,6 +3295,21 @@
     # Check to see whether there is enough LDAP functionality to be able
     # to build AD support.
 
+# HPUX only has ldap_init; ok, we take care of this in smbldap.c
+case "$host_os" in
+       *hpux*)
+    AC_CHECK_FUNC_EXT(ldap_init,$LDAP_LIBS)
+
+    if test x"$ac_cv_func_ext_ldap_init" != x"yes"; then
+       if test x"$with_ads_support" = x"yes"; then
+           AC_MSG_ERROR(Active Directory support on HPUX requires ldap_init)
+       elif test x"$with_ads_support" = x"auto"; then
+           AC_MSG_WARN(Disabling Active Directory support (requires ldap_init 
on HPUX))
+           with_ads_support=no
+       fi
+    fi
+    ;;
+       *)
     AC_CHECK_FUNC_EXT(ldap_initialize,$LDAP_LIBS)
 
     if test x"$ac_cv_func_ext_ldap_initialize" != x"yes"; then
@@ -3295,7 +3320,10 @@
            with_ads_support=no
        fi
     fi
+    ;;
+esac
 
+
     AC_CHECK_FUNC_EXT(ldap_add_result_entry,$LDAP_LIBS)
 
     if test x"$ac_cv_func_ext_ldap_add_result_entry" != x"yes"; then

Modified: branches/SAMBA_3_0_25/source/include/includes.h
===================================================================
--- branches/SAMBA_3_0_25/source/include/includes.h     2007-04-02 21:26:32 UTC 
(rev 22048)
+++ branches/SAMBA_3_0_25/source/include/includes.h     2007-04-02 23:07:06 UTC 
(rev 22049)
@@ -173,6 +173,15 @@
 
 #if HAVE_LBER_H
 #include <lber.h>
+#ifdef HPUX
+/* Define ber_tag_t and ber_int_t for using
+ * HP LDAP-UX Integration products' LDAP libraries.
+*/
+#ifndef ber_tag_t
+typedef unsigned int ber_tag_t;
+typedef unsigned int ber_int_t;
+#endif
+#endif /* HPUX */
 #ifndef LBER_USE_DER
 #define LBER_USE_DER 0x01
 #endif

<Prev in Thread] Current Thread [Next in Thread>