From: <mik...@us...> - 2003-12-30 15:11:21
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web In directory sc8-pr-cvs1:/tmp/cvs-serv16726 Modified Files: configure ChangeLog Log Message: 30/12/2003 Mikael Barbeaux * Added optimization checking into configure script Index: configure =================================================================== RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/configure,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- configure 30 Dec 2003 14:33:29 -0000 1.8 +++ configure 30 Dec 2003 15:11:18 -0000 1.9 @@ -77,7 +77,7 @@ if test -z ${COMM} then echo "Checking for $1 not found" - help_comp; + help_comp $1; else echo "Checking for $1 ${COMM}" fi @@ -168,8 +168,16 @@ else echo "CCFLAGS =" >> Makefile fi - echo "CCFLAGS += -O3 -fexpensive-optimizations" >> Makefile - + if test $optimize = 1 + then + ARCH=`uname -m` + if test $ARCH != "unknown" + then + echo "CCFLAGS += -march=$ARCH" >> Makefile + fi + echo "CCFLAGS += -O3 -fexpensive-optimizations" >> Makefile + fi + echo "" >> Makefile echo "all : clean \$(BIN) strip done" >> Makefile echo "" >> Makefile @@ -282,26 +290,14 @@ #### -# Other OS help -#### -other_os() { - echo "Your current plateform is : Unknown" - echo "This script cannot compile the program." - echo "Contact me for more informations :" - echo "mik...@us..." - echo "" - echo "Exiting." -} - - - -#### # Displays help #### help() { echo "Available options for configure :" - echo " --help" - echo " displays this help" + echo " --help : Displays this help" + echo " --enable-optimize : Enable optimization" + echo " --disable-optimize : Disable optimization" + exit; } @@ -309,8 +305,10 @@ #### # Displays compilation help #### -help_comp() { - echo "compilation help" +help_comp() { + echo "" + echo "Compilation error" + echo "Unable to find $1" exit; } @@ -330,21 +328,33 @@ # Main script #### +optimize=0 +while test $# -gt 0; +do + case $1 in + --help) + help; + ;; + --disable-optimize) + optimize=0; + ;; + --enable-optimize) + optimize=1; + ;; + esac + shift +done + echo "ShareDaemon Web Interface - configure script" echo "Written by MikaelB" -CONF_OPTIONS=$1 + OS=`uname -n` SYSTEM=`uname -s` -if test -n "$CONF_OPTIONS" -a "$CONF_OPTIONS" = "--help" -then - help; -else - check_config; -fi - echo "" echo "Check system : $OS - $SYSTEM" + +check_config; echo "Building Makefile..." build_Makefile; Index: ChangeLog =================================================================== RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/ChangeLog,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- ChangeLog 30 Dec 2003 14:33:29 -0000 1.23 +++ ChangeLog 30 Dec 2003 15:11:18 -0000 1.24 @@ -24,6 +24,7 @@ ----------------------------------------------------------- 30/12/2003 Mikael Barbeaux + * Added optimization checking into configure script * Added auto generation of index from the thread library into configure script * Fixed a compilation error for HttpServletResponse * Implemented first versions of HttpServletRequest, HttpServletResponse and |