From b995f263f8fe052062f0597ef4eb936a1d2c5c4f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 26 Apr 2006 00:11:33 +0000 Subject: r15262: Only include getprogname if it is needed by the system. This should fix the build on Mac OS X (This used to be commit 465409974da7a643617689ee7c5b55427f727548) --- source4/heimdal_build/config.m4 | 9 +++++++++ source4/heimdal_build/config.mk | 17 ++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/source4/heimdal_build/config.m4 b/source4/heimdal_build/config.m4 index 75667ab772..ad0bdee1a8 100644 --- a/source4/heimdal_build/config.m4 +++ b/source4/heimdal_build/config.m4 @@ -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) diff --git a/source4/heimdal_build/config.mk b/source4/heimdal_build/config.mk index 0bd1d86701..2131018906 100644 --- a/source4/heimdal_build/config.mk +++ b/source4/heimdal_build/config.mk @@ -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 ####################### -- cgit