@@ -620,6 +620,7 @@ ac_includes_default="\
620620
621621ac_subst_vars=' LTLIBOBJS
622622LIBOBJS
623+ LINK_CC
623624THREADS_LIBS
624625CC_SEARCH_FLAGS
625626LD_SEARCH_FLAGS
@@ -739,6 +740,7 @@ enable_rpath
739740enable_wince
740741with_celib
741742enable_symbols
743+ enable_swiftc_linker
742744'
743745 ac_precious_vars=' build_alias
744746host_alias
@@ -1365,6 +1367,7 @@ Optional Features:
13651367 --disable-rpath disable rpath support (default: on)
13661368 --enable-wince enable Win/CE support (where applicable)
13671369 --enable-symbols build with debugging symbols (default: off)
1370+ --enable-swiftc-linker use swiftc for linker (default: no)
13681371
13691372Optional Packages:
13701373 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -8593,6 +8596,98 @@ fi
85938596
85948597
85958598
8599+ # On Linux look for setproctitle support in libbsd
8600+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for library containing setproctitle_init" >&5
8601+ $as_echo_n " checking for library containing setproctitle_init... " >&6 ; }
8602+ if ${ac_cv_search_setproctitle_init+: } false ; then :
8603+ $as_echo_n " (cached) " >&6
8604+ else
8605+ ac_func_search_save_LIBS=$LIBS
8606+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
8607+ /* end confdefs.h. */
8608+
8609+ /* Override any GCC internal prototype to avoid an error.
8610+ Use char because int might match the return type of a GCC
8611+ builtin and then its argument prototype would still apply. */
8612+ #ifdef __cplusplus
8613+ extern "C"
8614+ #endif
8615+ char setproctitle_init ();
8616+ int
8617+ main ()
8618+ {
8619+ return setproctitle_init ();
8620+ ;
8621+ return 0;
8622+ }
8623+ _ACEOF
8624+ for ac_lib in ' ' bsd; do
8625+ if test -z " $ac_lib " ; then
8626+ ac_res=" none required"
8627+ else
8628+ ac_res=-l$ac_lib
8629+ LIBS=" -l$ac_lib $ac_func_search_save_LIBS "
8630+ fi
8631+ if ac_fn_c_try_link " $LINENO " ; then :
8632+ ac_cv_search_setproctitle_init=$ac_res
8633+ fi
8634+ rm -f core conftest.err conftest.$ac_objext \
8635+ conftest$ac_exeext
8636+ if ${ac_cv_search_setproctitle_init+: } false ; then :
8637+ break
8638+ fi
8639+ done
8640+ if ${ac_cv_search_setproctitle_init+: } false ; then :
8641+
8642+ else
8643+ ac_cv_search_setproctitle_init=no
8644+ fi
8645+ rm conftest.$ac_ext
8646+ LIBS=$ac_func_search_save_LIBS
8647+ fi
8648+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ac_cv_search_setproctitle_init " >&5
8649+ $as_echo " $ac_cv_search_setproctitle_init " >&6 ; }
8650+ ac_res=$ac_cv_search_setproctitle_init
8651+ if test " $ac_res " ! = no; then :
8652+ test " $ac_res " = " none required" || LIBS=" $ac_res $LIBS "
8653+
8654+ fi
8655+
8656+ for ac_func in setproctitle_init
8657+ do :
8658+ ac_fn_c_check_func " $LINENO " " setproctitle_init" " ac_cv_func_setproctitle_init"
8659+ if test " x$ac_cv_func_setproctitle_init " = xyes; then :
8660+ cat >> confdefs.h << _ACEOF
8661+ #define HAVE_SETPROCTITLE_INIT 1
8662+ _ACEOF
8663+
8664+ fi
8665+ done
8666+
8667+
8668+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking if swiftc linker is requested" >&5
8669+ $as_echo_n " checking if swiftc linker is requested... " >&6 ; }
8670+ # Check whether --enable-swiftc-linker was given.
8671+ if test " ${enable_swiftc_linker+set} " = set ; then :
8672+ enableval=$enable_swiftc_linker ; swiftlinker=$enableval
8673+ else
8674+ swiftlinker=no
8675+ fi
8676+
8677+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $swiftlinker " >&5
8678+ $as_echo " $swiftlinker " >&6 ; }
8679+
8680+ # Change linker arguments for rpath
8681+ if test " ${swiftlinker} " = " yes" ; then
8682+ LINK_CC=" swiftc -emit-executable"
8683+
8684+ CC_SEARCH_FLAGS=' -Xlinker -rpath=${LIB_RUNTIME_DIR}'
8685+ else
8686+ LINK_CC=$CC
8687+
8688+ fi
8689+
8690+
85968691# --------------------------------------------------------------------
85978692# Finally, substitute all of the various values into the Makefile.
85988693# You may alternatively have a special pkgIndex.tcl.in or other files
0 commit comments