diff options
author | Jeremy Allison <jra@samba.org> | 2007-04-02 23:07:06 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:05 -0500 |
commit | d2a57b63932496ba61ab2b9773eb959b6abaab8a (patch) | |
tree | a9878207ebde4418b09cc4ca6c975be9a1b39d12 /source3 | |
parent | 0a2cc569a1803f459f7db77d03e6e90ae30aa35d (diff) | |
download | samba-d2a57b63932496ba61ab2b9773eb959b6abaab8a.tar.gz samba-d2a57b63932496ba61ab2b9773eb959b6abaab8a.tar.bz2 samba-d2a57b63932496ba61ab2b9773eb959b6abaab8a.zip |
r22049: HPUX build fixes from <don.mccall@hp.com>.
Jeremy.
(This used to be commit b70af25e851b2695e552b10f1befb16e336fb36f)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/configure.in | 52 | ||||
-rw-r--r-- | source3/include/includes.h | 9 |
2 files changed, 49 insertions, 12 deletions
diff --git a/source3/configure.in b/source3/configure.in index 9cbb37debb..ca7a52533e 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -608,7 +608,6 @@ fi # 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 @@ case "$host_os" in ;; *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 @@ if test x"$with_ldap_support" != x"no"; then 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 @@ else # 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,6 +3335,9 @@ else with_ads_support=no fi fi + ;; +esac + AC_CHECK_FUNC_EXT(ldap_add_result_entry,$LDAP_LIBS) diff --git a/source3/include/includes.h b/source3/include/includes.h index 8bdf9c992f..47be8bea90 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -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 |