]> git.stg.codes - stg.git/blobdiff - projects/rscriptd/build
Syntactic fixes.
[stg.git] / projects / rscriptd / build
index 3b73000dc128369b54c831b86d9a79edb4c80104..da5c3b5b3df79f4bc23cf0d492fb5cbd9711c0b2 100755 (executable)
@@ -7,7 +7,8 @@
 
 OS=unknown
 sys=`uname -s`
-release=`uname -r | cut -b1`
+release=`uname -r`
+major=`printf "%s" "$release" | cut -d. -f1`
 BUILD_DIR=`pwd`
 CONFFILE="../../Makefile.conf"
 PREFIX="/"
@@ -35,13 +36,12 @@ LDFLAGS="$LDFLAGS -L/usr/local/lib"
 if [ "$sys" = "Linux" ]
 then
     OS=linux
-    release=""
     MAKE="make"
 fi
 
 if [ "$sys" = "FreeBSD" ]
 then
-    case $release in
+    case $major in
         4) OS=bsd;;
         5) OS=bsd5;;
         6) OS=bsd5;;
@@ -61,7 +61,7 @@ fi
 if [ "$OS" = "unknown" ]
 then
     printf "#############################################################################\n"
-    printf "# Sorry, but rscriptd currently supported by Linux, FreeBSD 4.x, 5.x, 6.x  #\n"
+    printf "# Sorry, but rscriptd is currently supported by Linux, FreeBSD and Darwin.  #\n"
     printf "#############################################################################\n"
     exit 1
 fi
@@ -172,6 +172,8 @@ do
 done
 printf "\n" >> $CONFFILE
 printf "LIB_THREAD=$LIB_THREAD\n" >> $CONFFILE
+printf "CC=$CC\n" >> $CONFFILE
+printf "CXX=$CXX\n" >> $CONFFILE
 printf "CXXFLAGS=$CXXFLAGS\n" >> $CONFFILE
 printf "CFLAGS=$CFLAGS\n" >> $CONFFILE
 printf "LDFLAGS=$LDFLAGS\n" >> $CONFFILE