From cf6b778799edf4ebc2331d12707e66e7d38331ea Mon Sep 17 00:00:00 2001 From: Leonid Bobrov Date: Tue, 7 Jan 2020 21:51:42 +0200 Subject: INSTALL, 9c, 9l: improve handling of *BSD (#302) --- INSTALL | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) (limited to 'INSTALL') diff --git a/INSTALL b/INSTALL index cb0df570..502eff41 100755 --- a/INSTALL +++ b/INSTALL @@ -29,6 +29,30 @@ case `uname` in SunOS) awk=nawk ;; +DragonFly|*BSD) + case `cc -v 2>&1` in + *clang*) + echo "CC9=clang" >> $PLAN9/config + ;; + *gcc*) + echo "CC9=gcc" >> $PLAN9/config + ;; + esac + echo "* Running on" `uname`", adjusting linker flags" + case `uname` in + OpenBSD) + echo "LDFLAGS='-L/usr/X11R6/lib -pthread'" >> $PLAN9/config + ;; + NetBSD) + echo "LDFLAGS='-L/usr/X11R7/lib -pthread'" >> $PLAN9/config + ;; + *) + echo "LDFLAGS='-L/usr/local/lib -pthread'" >> $PLAN9/config + ;; + esac + echo "CFLAGS='-pthread'" >> $PLAN9/config + awk=awk + ;; *) awk=awk ;; @@ -42,29 +66,6 @@ echo "* Resetting $PLAN9/config" rm -f config ( -if [ `uname` = FreeBSD ]; then - case `cc -v 2>&1` in - *clang*) - echo "CC9=clang" >> $PLAN9/config - ;; - *) - ;; - esac - echo "* Running on FreeBSD, adjusting linker flags" - echo "LDFLAGS='-L/usr/local/lib'" >> $PLAN9/config -fi - -if [ `uname` = DragonFly ]; then - echo "* Running on DragonFly BSD, adjusting linker flags" - echo "LDFLAGS='-L/usr/local/lib -pthread'" >> $PLAN9/config - echo "CFLAGS='-pthread'" >> $PLAN9/config -fi - -if [ `uname` = OpenBSD ]; then - echo "* Running on OpenBSD, adjusting linker flags" - echo "LDFLAGS='-L/usr/X11R6/lib -pthread'" >> $PLAN9/config -fi - if [ `uname` = Linux ]; then # On Linux, we use the kernel version to decide whether # to use pthreads or not. On 2.6 versions that aren't @@ -135,6 +136,7 @@ if [ `uname` != Darwin ]; then # Determine whether fontsrv X11 files are available. rm -f a.out cc -o a.out -c -Iinclude -I/usr/include -I/usr/local/include -I/usr/include/freetype2 -I/usr/local/include/freetype2 \ + -I/usr/X11R7/include -I/usr/X11R7/include/freetype2 \ -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 src/cmd/fontsrv/x11.c >/dev/null 2>&1 if [ -f a.out ]; then echo " fontsrv dependencies found." -- cgit v1.2.3 From 952a9afae06b4e13b1e0da3e768bbd4bf64b9ec5 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 13 Jan 2020 23:38:04 -0500 Subject: INSTALL: do not rm config after setting it up Fixes #334. --- INSTALL | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'INSTALL') diff --git a/INSTALL b/INSTALL index 502eff41..0291e713 100755 --- a/INSTALL +++ b/INSTALL @@ -23,6 +23,13 @@ x-r) exit 1 esac +echo "+ Mailing list: https://groups.google.com/group/plan9port-dev" +echo "+ Issue tracker: https://github.com/9fans/plan9port/issues/" +echo "+ Submitting changes: https://github.com/9fans/plan9port/pulls" +echo " " +echo "* Resetting $PLAN9/config" +rm -f config + PLAN9=`pwd` export PLAN9 PATH=/bin:/usr/bin:$PLAN9/bin:$PATH export PATH case `uname` in @@ -58,13 +65,6 @@ DragonFly|*BSD) ;; esac -echo "+ Mailing list: https://groups.google.com/group/plan9port-dev" -echo "+ Issue tracker: https://github.com/9fans/plan9port/issues/" -echo "+ Submitting changes: https://github.com/9fans/plan9port/pulls" -echo " " -echo "* Resetting $PLAN9/config" -rm -f config - ( if [ `uname` = Linux ]; then # On Linux, we use the kernel version to decide whether -- cgit v1.2.3