r15262: Only include getprogname if it is needed by the system. This should
authorJelmer Vernooij <jelmer@samba.org>
Wed, 26 Apr 2006 00:11:33 +0000 (00:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:04:28 +0000 (14:04 -0500)
fix the build on Mac OS X

source/heimdal_build/config.m4
source/heimdal_build/config.mk

index 75667ab7723fc3a0d46cdf290c764dda4c90ba9f..ad0bdee1a8b5a7afd920b874d81479c48b8a8dac 100644 (file)
@@ -62,6 +62,7 @@ AC_CHECK_HEADERS([                            \
 AC_CHECK_FUNCS([                               \
        atexit                                  \
        cgetent                                 \
+       getprogname                             \
        inet_ntop                               \
        inet_aton                               \
        gethostname                             \
@@ -235,6 +236,14 @@ if test t$ac_cv_func_inet_aton != tyes; then
        SMB_ENABLE(HEIMDAL_ROKEN_INET_ATON, YES)
 fi
 
+# only add getprogname if needed
+SMB_ENABLE(HEIMDAL_ROKEN_GETPROGNAME, NO)
+SMB_ENABLE(HEIMDAL_ROKEN_GETPROGNAME_HOST, NO)
+if test t$ac_cv_func_getprogname != tyes; then
+       SMB_ENABLE(HEIMDAL_ROKEN_GETPROGNAME, YES)
+       SMB_ENABLE(HEIMDAL_ROKEN_GETPROGNAME_HOST, YES)
+fi
+
 # only add gai_strerror if needed
 SMB_ENABLE(HEIMDAL_ROKEN_GAI_STRERROR, NO)
 AC_CHECK_FUNC(gai_strerror)
index 0bd1d867014ad0f3b7333f37c72ef1884366a538..213101890691f8bc30cb1fc553adb5605d6e4445 100644 (file)
@@ -297,6 +297,14 @@ OBJ_FILES = ../heimdal/lib/roken/gai_strerror.o
 EXTRA_CFLAGS = -Iheimdal_build -Iheimdal/lib/roken
 OBJ_FILES = ../heimdal/lib/roken/inet_aton.o
 
+[SUBSYSTEM::HEIMDAL_ROKEN_GETPROGNAME]
+EXTRA_CFLAGS = -Iheimdal_build -Iheimdal/lib/roken
+OBJ_FILES = ../heimdal/lib/roken/getprogname.o
+
+[SUBSYSTEM::HEIMDAL_ROKEN_GETPROGNAME_HOST]
+EXTRA_CFLAGS = -Iheimdal_build -Iheimdal/lib/roken
+OBJ_FILES = ../heimdal/lib/roken/getprogname.ho
+
 #######################
 # Start SUBSYSTEM HEIMDAL_ROKEN_ADDRINFO
 [SUBSYSTEM::HEIMDAL_ROKEN_ADDRINFO]
@@ -309,6 +317,7 @@ OBJ_FILES = \
        ../heimdal/lib/roken/freehostent.o \
        ../heimdal/lib/roken/copyhostent.o \
        ../heimdal/lib/roken/hostent_find_fqdn.o
+PRIVATE_DEPENDENCIES = EXT_LIB_SOCKET
 
 #######################
 # Start SUBSYSTEM HEIMDAL_ROKEN
@@ -319,7 +328,6 @@ OBJ_FILES = \
        ../heimdal/lib/roken/hex.o \
        ../heimdal/lib/roken/bswap.o \
        ../heimdal/lib/roken/get_window_size.o \
-       ../heimdal/lib/roken/getprogname.o \
        ../heimdal/lib/roken/h_errno.o \
        ../heimdal/lib/roken/issuid.o \
        ../heimdal/lib/roken/net_read.o \
@@ -340,6 +348,7 @@ PUBLIC_DEPENDENCIES = \
                        HEIMDAL_ROKEN_ADDRINFO \
                        HEIMDAL_ROKEN_GAI_STRERROR \
                        HEIMDAL_ROKEN_INET_ATON \
+                       HEIMDAL_ROKEN_GETPROGNAME \
                        EXT_LIB_GAI
 # End SUBSYSTEM HEIMDAL_ROKEN
 #######################
@@ -391,7 +400,6 @@ OBJ_FILES = \
        ../heimdal/lib/roken/getarg.ho \
        ../heimdal/lib/roken/setprogname.ho \
        ../heimdal/lib/roken/strupr.ho \
-       ../heimdal/lib/roken/getprogname.ho \
        ../heimdal/lib/roken/get_window_size.ho \
        ../heimdal/lib/roken/estrdup.ho \
        ../heimdal/lib/roken/ecalloc.ho \
@@ -400,7 +408,7 @@ OBJ_FILES = \
        ../heimdal/lib/vers/print_version.ho \
        ../lib/replace/snprintf.ho \
        ../lib/replace/replace.ho
-PRIVATE_DEPENDENCIES = HEIMDAL_ASN1_COMPILE_LEX
+PRIVATE_DEPENDENCIES = HEIMDAL_ASN1_COMPILE_LEX HEIMDAL_ROKEN_GETPROGNAME_HOST
 # End BINARY asn1_compile
 #######################
 
@@ -421,13 +429,12 @@ OBJ_FILES = ../heimdal/lib/vers/print_version.ho \
        ../heimdal/lib/com_err/compile_et.ho \
        ../heimdal/lib/roken/getarg.ho \
        ../heimdal/lib/roken/get_window_size.ho \
-       ../heimdal/lib/roken/getprogname.ho \
        ../heimdal/lib/roken/strupr.ho \
        ../heimdal/lib/roken/setprogname.ho \
        replace.ho \
        ../lib/replace/snprintf.ho \
        ../lib/replace/replace.ho
-PRIVATE_DEPENDENCIES = HEIMDAL_COM_ERR_COMPILE_LEX
+PRIVATE_DEPENDENCIES = HEIMDAL_COM_ERR_COMPILE_LEX HEIMDAL_ROKEN_GETPROGNAME_HOST
 # End BINARY compile_et
 #######################