OSDN Git Service

Fix hb_log to truncate the message at the correct point, fixes 1244.
[handbrake-jp/handbrake-jp-git.git] / configure
index d983694..f27f2ba 100755 (executable)
--- a/configure
+++ b/configure
@@ -5,6 +5,7 @@ CXX="g++"
 CCFLAGS="$CCFLAGS -Wall -g"
 OPTIM="$OPTIM -O3 -funroll-loops"
 LINKLIBS="-lz"
+MAKE=make
 
 # System-specific flags
 SYSTEM=`uname -s`
@@ -55,6 +56,10 @@ case $SYSTEM in
     DEFINES="$DEFINES SYS_CYGWIN USE_PTHREAD"
     LINKLIBS="$LINKLIBS -lpthread"
     ;;
+  SunOS)
+    DEFINES="$DEFINES SYS_SunOS USE_PTHREAD _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64"
+    LINKLIBS="$LINKLIBS -lpthread -lsocket -lnsl"
+    ;;
 
   *)
     echo "Unsupported operating system"
@@ -70,7 +75,7 @@ int main()
     return *( (char *) &i );
 }
 EOF
-if ( cc -o testconf testconf.c && ./testconf ) > /dev/null 2>&1
+if ( $CC -o testconf testconf.c && ./testconf ) > /dev/null 2>&1
 then
   echo "Endian: big"
   DEFINES="$DEFINES WORDS_BIGENDIAN"
@@ -79,6 +84,19 @@ else
 fi
 rm -f testconf.c testconf
 
+#
+# Use Gnu make when available over the built in make
+#
+if ( make --version | grep GNU ) > /dev/null 2>&1
+then
+MAKE=make
+elif ( gmake --version | grep GNU ) > /dev/null 2>&1
+then
+MAKE=gmake
+else
+MAKE=make
+fi
+
 # Generate config.jam
 rm -f config.jam
 cat << EOF > config.jam
@@ -90,9 +108,10 @@ C++FLAGS = $CCFLAGS ;
 OPTIM    = $OPTIM ;
 DEFINES  = $DEFINES ;
 LINKLIBS = $LINKLIBS ;
+MAKE     = $MAKE ;
 EOF
 
 echo
 echo "To build HandBrake, run:"
-echo " 'make' on a Mac (or './jam' to build all libraries from source),"
+echo " './jam' on a Mac (or 'make' to try the UB build method),"
 echo " 'jam' on Linux or Windows."