# Check for modules
case "$OSNAME" in
- (FreeBSD)
+ FreeBSD)
LDLIBS="-Ldl"
FLAGS="-fPIC -frtti $OPTIMISATI"
MAKEPROG="gmake"
;;
- (*)
+ *)
LDLIBS="-ldl"
FLAGS="-fPIC -frtti $OPTIMISATI"
MAKEPROG="make"
}
echo "#include <string.h>">.test.cpp
-echo >"int main() { char a[10]; char b[10]; strlcpy(a,b,10); sprintf("999"); }" >>.test.cpp
-gcc -o .test .test.cpp
-$HAS_STRLCPY=`./.test`
+echo "#include <stdio.h>">>.test.cpp
+echo "int main() { char a[10]; char b[10]; strlcpy(a,b,10); printf(\"%d\\n\",999); }" >>.test.cpp
+g++ -o .test .test.cpp 2>&1
+HAS_STRLCPY=`./.test 2>&1`
rm -f .test.cpp .test
clear
cc=$OPTIMITEMP
fi
case "$cc" in
- (1)
+ 1)
OPTIMITEMP=1
OPTIMISATI="-O"
;;
- (2)
+ 2)
OPTIMITEMP=2
OPTIMISATI="-O2"
;;
- (3)
+ 3)
OPTIMITEMP=3
OPTIMISATI="-O3"
;;
- (*)
+ *)
OPTIMITEMP=0
OPTIMISATI="-g"
;;
echo -e "\033[0;37mOptimatizaton Flag:\033[1;32m\t\t$OPTIMISATI"
echo -e "\033[0;37m"
-yyecho "Writing cache file for future ./configures ..."
+echo "Writing cache file for future ./configures ..."
+COPY_CONF=0
if [ "$CONFIG_DIR" != "$ME/conf" ] ; then
COPY_CONF=1
fi
echo "Preparing Variables for the Makefile"
case "$OSNAME" in
- (FreeBSD)
+ FreeBSD)
LDLIBS="-Ldl"
FLAGS="-fPIC -frtti $OPTIMISATI"
MAKEPROG="gmake"
;;
- (*)
+ *)
LDLIBS="-ldl"
FLAGS="-fPIC -frtti $OPTIMISATI"
MAKEPROG="make"