what=`/bin/pwd|sed -e 's+.*/++'` prefix=/.software/share/$what eprefix=/.software/arch/$what lprefix=/.software/local/$what case "$what" in samba-*) ;; *) echo "strange working directory for a samba configure" >&2 exit 1 esac cd source || exit 1 case "`uname -m`" in i?86) CFLAGS="$CFLAGS -m486" gcc -v 2>&1|grep egcs>/dev/null || CFLAGS="$CFLAGS -no-strength-reduce" ;; arm*) OPTS="build=arm-linuxelf" CFLAGS="-D__USE_GNU";; esac grep -q netwinder config.sub || patch -u -t -N -p2< --- libc/scripts/config.sub Tue Oct 27 11:38:36 1998 +++ glibc/scripts/config.sub Tue Nov 3 16:20:40 1998 @@ -182,7 +182,7 @@ | sparc64-* | mips64-* | mipsel-* \\ | mips64el-* | mips64orion-* | mips64orionel-* \\ | mipstx39-* | mipstx39el-* \\ - | f301-*) + | f301-* | armv*-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -412,6 +412,10 @@ basic_machine=i486-ncr os=-sysv4 ;; + netwinder) + basic_machine=armv4l-ccc + os=-linux + ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos @@ -801,6 +805,9 @@ case \$basic_machine in *-acorn) os=-riscix1.2 + ;; + arm*-ccc) + os=-linux ;; arm*-semi) os=-aout EOF test -d /software/ldap && OPTS="$OPTS --with-ldap=/software/ldap" #test -d /software/ssl && OPTS="$OPTS --with-ssl=/software/ssl" # Need to patch Makefile.in for get sensible values for LOGDIR and CODEPAGEDIR if [ -f Makefile.in ]; then if sed \ -e '1,$s!\$(LIBDIR)/lmhosts!@datadir@/lmhosts!g' \ -e '1,$s!\$(LIBDIR)/printers.def!@datadir@/printers.def!g' \ -e '1,$s!\$(VARDIR)/locks!@prefix@/locks!g' \ -e '1,$s!\$(LIBDIR)/codepages!@datadir@/codepages!g' \ < Makefile.in > Makefile.in.new; then mv Makefile.in.new Makefile.in else rm -f Makefile.in.tmp fi fi # --with-smbmount only works for 2.2 kernels uname_r=`uname -r` major=`echo $uname_r|cut -d. -f1` minor=`echo $uname_r|cut -d. -f2` patchlevel=`echo $uname_r|cut -d. -f3` if [ $major -gt 2 -o \( $major -eq 2 -a \( $minor -gt 1 -o \( $minor -eq 1 -a $patchlevel -gt 70 \) \) \) ]; then OPTS="$OPTS --with-smbmount" fi # Samba uses var for logs, lib mostly for config (and also locks) # sbindir is apparently used for servers ./configure \ --prefix=$prefix \ --bindir=$eprefix/bin \ --sbindir=$eprefix/servers \ --sysconfdir=$lprefix/config \ --datadir=$prefix/data \ --localstatedir=$lprefix/logs \ --libdir=$lprefix/config \ --with-mmap \ --with-syslog \ --with-netatalk \ --with-quotas \ --with-privatedir=$lprefix/config \ --with-swatdir=$prefix/data/swat \ $OPTS