From: Alan T. DeKok Date: Sun, 15 May 2022 14:09:41 +0000 (-0400) Subject: Add explicit paths for OSX X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfbeddb2f1377aa91ae0fb2a4a97b1d46e41d142;p=thirdparty%2Ffreeradius-server.git Add explicit paths for OSX because apparently some of the C compilers aren't built with the default paths for everything on the system. --- diff --git a/scripts/libtool.mk b/scripts/libtool.mk index 9b59d018fff..5d2032670e5 100644 --- a/scripts/libtool.mk +++ b/scripts/libtool.mk @@ -60,6 +60,11 @@ ifeq "${LIBTOOL}" "JLIBTOOL" JLIBTOOL_DEFS += -DTARGET_RANLIB=\"${TARGET_RANLIB}\" endif + # clang on OSX sometimes doesn't know where things are. + ifeq "$(findstring darwin,$(TARGET_SYSTEM))" "darwin" + JLIBTOOL_DEFS += -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib + endif + # Add a rule to build jlibtool BEFORE any other targets. This # means that we can use it to build the later targets. all install: ${JLIBTOOL} diff --git a/src/modules/rlm_mschap/configure b/src/modules/rlm_mschap/configure index 44b201f37f9..c51c7da0f41 100755 --- a/src/modules/rlm_mschap/configure +++ b/src/modules/rlm_mschap/configure @@ -3054,7 +3054,7 @@ smart_prefix= $as_echo "#define HAVE_MEMBERSHIP_H 1" >>confdefs.h mschap_sources="$mschap_sources opendir.c" - mod_ldflags="-framework DirectoryService" + mod_ldflags="-F /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -framework DirectoryService" fi smart_try_dir="$winbind_include_dir /usr/include/samba-4.0" diff --git a/src/modules/rlm_mschap/configure.ac b/src/modules/rlm_mschap/configure.ac index eb9dcdf6895..ed999eeb07d 100644 --- a/src/modules/rlm_mschap/configure.ac +++ b/src/modules/rlm_mschap/configure.ac @@ -73,7 +73,7 @@ if test x$with_[]modname != xno; then if test "x$ac_cv_header_membership_h" = "xyes"; then AC_DEFINE([HAVE_MEMBERSHIP_H],[1],[Build with Apple Open Directory support]) mschap_sources="$mschap_sources opendir.c" - mod_ldflags="-framework DirectoryService" + mod_ldflags="-F /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -framework DirectoryService" fi smart_try_dir="$winbind_include_dir /usr/include/samba-4.0" diff --git a/src/modules/rlm_opendirectory/configure b/src/modules/rlm_opendirectory/configure index ca2776d9b41..22ca2af58d3 100755 --- a/src/modules/rlm_opendirectory/configure +++ b/src/modules/rlm_opendirectory/configure @@ -2759,7 +2759,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu - mod_ldflags="${mod_ldflags} -framework DirectoryService" + mod_ldflags="${mod_ldflags} -F /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -framework DirectoryService" diff --git a/src/modules/rlm_opendirectory/configure.ac b/src/modules/rlm_opendirectory/configure.ac index 0273c86a6e3..b68e6b17515 100644 --- a/src/modules/rlm_opendirectory/configure.ac +++ b/src/modules/rlm_opendirectory/configure.ac @@ -11,7 +11,7 @@ if test x$with_[]modname != xno; then AC_PROG_CC AC_PROG_CPP - mod_ldflags="${mod_ldflags} -framework DirectoryService" + mod_ldflags="${mod_ldflags} -F /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -framework DirectoryService" FR_SMART_CHECK_INCLUDE(membership.h) if test "$ac_cv_header_membership_h" != "yes"; then