New utility to get home directory of user.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@12887 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-02-28 15:01:51 +00:00
parent ba5043927b
commit 6ed46fa8e1
6 changed files with 286 additions and 48 deletions

95
configure vendored
View file

@ -1776,7 +1776,7 @@ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gs_cv_objc_libdir"
export LD_LIBRARY_PATH
#--------------------------------------------------------------------
# Miscellaneous headers (only used for compiling which_lib.c)
# Miscellaneous headers (only used for compiling which_lib.c and user_home.c)
#--------------------------------------------------------------------
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
@ -1903,7 +1903,7 @@ fi
fi
for ac_hdr in sys/param.h sys/file.h dir.h string.h stdlib.h sys/types.h sys/stat.h
for ac_hdr in sys/param.h sys/file.h dir.h string.h stdlib.h sys/types.h sys/stat.h pwd.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -1943,6 +1943,61 @@ else
fi
done
for ac_func in getpwnam getpwuid geteuid getlogin
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1950: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1955 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:1978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
#--------------------------------------------------------------------
# Check if libobjc was compiled with thread support.
@ -1960,7 +2015,7 @@ fi
echo $ac_n "checking whether objc has thread support""... $ac_c" 1>&6
echo "configure:1964: checking whether objc has thread support" >&5
echo "configure:2019: checking whether objc has thread support" >&5
extra_LIBS=""
case "${target_os}" in
solaris*)
@ -1979,11 +2034,11 @@ if test "$OBJC_THREAD" != ""; then
objc_threaded=""
else
cat > conftest.$ac_ext <<EOF
#line 1983 "configure"
#line 2038 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:1987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="$OBJC_THREAD $extra_LIBS"
else
@ -2001,11 +2056,11 @@ elif test "$host_os" = linux-gnu; then
objc_threaded="-lpthread"
else
cat > conftest.$ac_ext <<EOF
#line 2005 "configure"
#line 2060 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="-lpthread"
else
@ -2023,11 +2078,11 @@ elif test "`echo $host_os|sed 's/[0-9].*//'|sed s/elf//`" = freebsd; then
objc_threaded="-pthread"
else
cat > conftest.$ac_ext <<EOF
#line 2027 "configure"
#line 2082 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="-pthread"
else
@ -2045,11 +2100,11 @@ fi
objc_threaded="-lpthread"
else
cat > conftest.$ac_ext <<EOF
#line 2049 "configure"
#line 2104 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:2053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="-lpthread"
else
@ -2068,11 +2123,11 @@ fi
objc_threaded="-lpcthread"
else
cat > conftest.$ac_ext <<EOF
#line 2072 "configure"
#line 2127 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="-lpcthread"
else
@ -2092,11 +2147,11 @@ elif test "$MINGW32" = yes; then
objc_threaded="works"
else
cat > conftest.$ac_ext <<EOF
#line 2096 "configure"
#line 2151 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="works"
else
@ -2114,11 +2169,11 @@ else
objc_threaded=""
else
cat > conftest.$ac_ext <<EOF
#line 2118 "configure"
#line 2173 "configure"
#include "confdefs.h"
#include "config_thread.m"
EOF
if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
objc_threaded="-lthread $extra_LIBS"
else
@ -2150,7 +2205,7 @@ ac_cv_objc_threaded="$objc_threaded"
#--------------------------------------------------------------------
echo $ac_n "checking if the compiler supports autodependencies""... $ac_c" 1>&6
echo "configure:2154: checking if the compiler supports autodependencies" >&5
echo "configure:2209: checking if the compiler supports autodependencies" >&5
# What we want to do: set AUTO_DEPENDENCIES to yes if gcc => 3.x
@ -2184,7 +2239,7 @@ fi
# Enable/disable warnings for deprecated #import directive as required
#---------------------------------------------------------------------
echo $ac_n "checking whether to disable compiler warnings about deprecated import""... $ac_c" 1>&6
echo "configure:2188: checking whether to disable compiler warnings about deprecated import" >&5
echo "configure:2243: checking whether to disable compiler warnings about deprecated import" >&5
#
# GCC recommends that you use `--disable-import' here, since #import
@ -2210,7 +2265,7 @@ fi
# Record the version
#--------------------------------------------------------------------
echo $ac_n "checking for the version of gnustep-make we are compiling""... $ac_c" 1>&6
echo "configure:2214: checking for the version of gnustep-make we are compiling" >&5
echo "configure:2269: checking for the version of gnustep-make we are compiling" >&5
. "$srcdir/Version"
echo "$ac_t""$GNUSTEP_MAKE_VERSION" 1>&6