]> git.stg.codes - stg.git/blobdiff - projects/sgconv/build
Merge pull request #2 from bobr-kun/MySQL_custom_port
[stg.git] / projects / sgconv / build
index 3eb6e033dc30a70cd5de6aa43c52b56ed44582ba..60705252523c5732756ff781b1063efbc3a9e907 100755 (executable)
@@ -116,6 +116,16 @@ then
     CXX=g++
 fi
 
     CXX=g++
 fi
 
+if [ -z "$AR" ]
+then
+    AR=ar
+fi
+
+if [ -z "$RANLIB" ]
+then
+    RANLIB=ranlib
+fi
+
 printf "Checking CC... "
 $CC --version > /dev/null 2> /dev/null
 if [ $? != 0 ]
 printf "Checking CC... "
 $CC --version > /dev/null 2> /dev/null
 if [ $? != 0 ]
@@ -134,6 +144,24 @@ then
     exit;
 fi
 printf "found\n"
     exit;
 fi
 printf "found\n"
+printf "Checking AR... "
+$AR --version > /dev/null 2> /dev/null
+if [ $? != 0 ]
+then
+    printf "FAIL!\n"
+    printf "$AR not found\n"
+    exit;
+fi
+printf "found\n"
+printf "Checking RANLIB... "
+$RANLIB --version > /dev/null 2> /dev/null
+if [ $? != 0 ]
+then
+    printf "FAIL!\n"
+    printf "$RANLIB not found\n"
+    exit;
+fi
+printf "found\n"
 
 printf "Checking endianess... "
 printf "int main() { int probe = 0x00000001; return *(char *)&probe; }\n" > build_check.c
 
 printf "Checking endianess... "
 printf "int main() { int probe = 0x00000001; return *(char *)&probe; }\n" > build_check.c
@@ -359,6 +387,8 @@ done
 printf "\n" >> $CONFFILE
 printf "CC=$CC\n" >> $CONFFILE
 printf "CXX=$CXX\n" >> $CONFFILE
 printf "\n" >> $CONFFILE
 printf "CC=$CC\n" >> $CONFFILE
 printf "CXX=$CXX\n" >> $CONFFILE
+printf "AR=$AR\n" >> $CONFFILE
+printf "RANLIB=$RANLIB\n" >> $CONFFILE
 printf "CXXFLAGS=$CXXFLAGS\n" >> $CONFFILE
 printf "CFLAGS=$CFLAGS\n" >> $CONFFILE
 printf "LDFLAGS=$LDFLAGS\n" >> $CONFFILE
 printf "CXXFLAGS=$CXXFLAGS\n" >> $CONFFILE
 printf "CFLAGS=$CFLAGS\n" >> $CONFFILE
 printf "LDFLAGS=$LDFLAGS\n" >> $CONFFILE