]> git.stg.codes - stg.git/blobdiff - projects/sgauth/build
Fixes in dealing with external libs.
[stg.git] / projects / sgauth / build
index e7c4be9b0e745c68d97ba8b5df29e84618888a2a..0e7e5f01080c81f83de269230c572bd11b9cb2a2 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;;
@@ -64,7 +64,7 @@ fi
 if [ "$OS" = "unknown" ]
 then
     printf "#############################################################################\n"
-    printf "# Sorry, but sgauth currently supported by Linux, FreeBSD 4.x, 5.x, 6.x  #\n"
+    printf "# Sorry, but sgauth is currently supported by Linux, FreeBSD and Darwin.    #\n"
     printf "#############################################################################\n"
     exit 1
 fi
@@ -174,6 +174,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