]> git.stg.codes - stg.git/blobdiff - projects/sgconv/build
Fix build on Darwin.
[stg.git] / projects / sgconv / build
index da83a527e9d98faa470d5279da835890b1e5bb25..3eb6e033dc30a70cd5de6aa43c52b56ed44582ba 100755 (executable)
@@ -56,7 +56,7 @@ if [ "$sys" = "Darwin" ]
 then
     OS=darwin
     ETC_DIR="./inst/freebsd/etc/stargazer"
 then
     OS=darwin
     ETC_DIR="./inst/freebsd/etc/stargazer"
-    MAKE="gmake"
+    MAKE="make"
 fi
 
 if [ "$OS" = "unknown" ]
 fi
 
 if [ "$OS" = "unknown" ]
@@ -72,7 +72,6 @@ printf "       Building sgconv for $sys $release\n"
 printf "#############################################################################\n"
 
 STG_LIBS="logger.lib
 printf "#############################################################################\n"
 
 STG_LIBS="logger.lib
-          locker.lib
           crypto.lib
           common.lib
           conffiles.lib
           crypto.lib
           common.lib
           conffiles.lib
@@ -100,7 +99,6 @@ else
             then
                 DEFS="$DEFS -DDARWIN"
                 LIB_THREAD=-lpthread
             then
                 DEFS="$DEFS -DDARWIN"
                 LIB_THREAD=-lpthread
-                LIBICONV=""
             else
                 LIB_THREAD=-lc_r
             fi
             else
                 LIB_THREAD=-lc_r
             fi
@@ -164,7 +162,7 @@ rm -f fake
 
 printf "Checking for iconv 2nd argument... "
 printf "#include <iconv.h>\nint main(){ const char** src = 0; iconv(0, src, 0, 0, 0); }\n" > build_check.c
 
 printf "Checking for iconv 2nd argument... "
 printf "#include <iconv.h>\nint main(){ const char** src = 0; iconv(0, src, 0, 0, 0); }\n" > build_check.c
-$CXX $CXXFLAGS $LDFLAGS -Werror build_check.c $LIBICONV -o fake > /dev/null 2> /dev/null
+$CC $CFLAGS $LDFLAGS -Werror build_check.c $LIBICONV -o fake > /dev/null 2> /dev/null
 if [ $? != 0 ]
 then
     printf "non-const\n"
 if [ $? != 0 ]
 then
     printf "non-const\n"
@@ -181,7 +179,7 @@ then
     printf "no\n"
     printf "Checking for -lfbclient... "
     printf "int main() { return 0; }\n" > build_check.c
     printf "no\n"
     printf "Checking for -lfbclient... "
     printf "int main() { return 0; }\n" > build_check.c
-    $CXX $CXXFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null
+    $CC $CFLAGS $LDFLAGS build_check.c -lfbclient $LIB_THREAD -o fake > /dev/null 2> /dev/null
     if [ $? != 0 ]
     then
         CHECK_FBCLIENT=no
     if [ $? != 0 ]
     then
         CHECK_FBCLIENT=no
@@ -263,7 +261,7 @@ if [ $? != 0 ]
 then
     printf "no\n";
     printf "Checking for -lpq... "
 then
     printf "no\n";
     printf "Checking for -lpq... "
-    $CXX $CXXFLAGS $LDFLAGS build_check.c -lpq $LIB_THREAD -o fake > /dev/null 2> /dev/null
+    $CC $CFLAGS $LDFLAGS build_check.c -lpq $LIB_THREAD -o fake > /dev/null 2> /dev/null
     if [ $? != 0 ]
     then
         CHECK_PQ=no
     if [ $? != 0 ]
     then
         CHECK_PQ=no