Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/scripts/config

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

rfork ne

sub = `{du -a . | grep config.sub}
if(~ $#sub 2)
	>$sub(2)

CC=cc
CFLAGS='-D_POSIX_SOURCE -D_BSD_EXTENSION -DHAVE_SOCK_OPTS -D_RESEARCH_SOURCE -D_SUSV2_SOURCE'

options = ( --host i386-lucent-plan9 )
options = ( $options --build i386-lucent-plan9)
options = ( $options --bindir /$objtype/bin/ape )
options = ( $options --datadir /sys/lib/ape )
options = ( $options --exec-prefix /$objtype/bin/ape )
options = ( $options --includedir /sys/include/ape )
options = ( $options --prefix /sys/lib/ape )
options = ( $options --sbindir /$objtype/bin/ape )
options = ( $options --sharedstatedir /sys/lib/ape  )
options = ( $options --disable-nls )

options = ( $options `{ ape/psh configure --help  |grep ' --(enable|disable)-[^F]'|awk '{print $1}' |sed -e 's/--enable/--disable/' -e 's/\[.*//'|grep -v '='} )
options = ( $options `{ ape/psh configure --help  |grep ' --(without)-[^F]'|awk '{print $1}' |sed -e 's/\[.*//'|grep -v '='} )
options = ($options $*)

echo running configure $options
exit
ape/psh configure $options #>/dev/null || exit configure

if(test -f config.h) {
	grep -v '(SPRINTF_RET|HAVE_STDBOOL_H|HAVE_ARGZ_H)' config.h > /tmp/config.$pid
	mv /tmp/config.$pid config.h

	echo '
#include <stdlib.h>
#define S_ISSOCK(x)	(-1)
#define getpagesize() (1)
#define SPRINTF_RET int
#define BROKEN_STRNCASECMP 1
#define DEFAULT_RMT_COMMAND "/bin/rmt"
' >> config.h
}

#mkdir -p sys
#>sys/file.h
#>malloc.h
#>memory.h

exit
echo running make, this may take a another while...
echo make | ape/psh

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].