configure
changeset 398 c928fd8cb759
parent 391 7802a7d5584f
child 400 7d845f5d730c
equal deleted inserted replaced
397:f9e720b220ea 398:c928fd8cb759
   107 	--kerneldir=*)	SUB_KERNELDIR=$optarg;;
   107 	--kerneldir=*)	SUB_KERNELDIR=$optarg;;
   108 	--prefix=*)	SUB_PREFIX=$optarg;;
   108 	--prefix=*)	SUB_PREFIX=$optarg;;
   109 	--target=*)	SUB_TARGET=$optarg;;
   109 	--target=*)	SUB_TARGET=$optarg;;
   110 	--can=*)	SUB_CAN_DRIVER=$optarg;;
   110 	--can=*)	SUB_CAN_DRIVER=$optarg;;
   111 	--timers=*)	SUB_TIMERS_DRIVER=$optarg;;
   111 	--timers=*)	SUB_TIMERS_DRIVER=$optarg;;
       
   112 	--wx=*)		SUB_WX=$optarg;
       
   113 			echo "Forced wx detection to $optarg";;
   112 	--disable-Ox)	DISABLE_OPT=1;
   114 	--disable-Ox)	DISABLE_OPT=1;
   113 			echo "On user request: Won't optimize with \"-Ox\"";;
   115 			echo "On user request: Won't optimize with \"-Ox\"";;
   114 	--disable-dll)	DISABLE_DLL=1;
   116 	--disable-dll)	DISABLE_DLL=1;
   115 			echo "On user request: Won't create and link to dll";;
   117 			echo "On user request: Won't create and link to dll";;
   116 	--enable-lss)	ENABLE_LSS=1;
   118 	--enable-lss)	ENABLE_LSS=1;
   154 		echo	"               \"lincan\" lincan driver"
   156 		echo	"               \"lincan\" lincan driver"
   155 		echo	"                 see http://www.ocera.org/download/components/WP7/lincan-0.3.3.html"
   157 		echo	"                 see http://www.ocera.org/download/components/WP7/lincan-0.3.3.html"
   156 		echo	"               \"can4linux\" can4linux driver"
   158 		echo	"               \"can4linux\" can4linux driver"
   157 		echo	"                 see http://www.port.de/engl/canprod/hw_can4linux.html"
   159 		echo	"                 see http://www.port.de/engl/canprod/hw_can4linux.html"
   158 		echo 	" --timers=foo  Use 'foo' as TIMERS driver (can be 'unix', 'xeno' or 'kernel')"
   160 		echo 	" --timers=foo  Use 'foo' as TIMERS driver (can be 'unix', 'xeno' or 'kernel')"
       
   161 		echo 	" --wx=foo  force result of WxWidgets detection (0 or 1)"
   159 		echo 	" --disable-dll Disable run-time dynamic linking of can, led and nvram drivers"
   162 		echo 	" --disable-dll Disable run-time dynamic linking of can, led and nvram drivers"
   160 		echo 	" --enable-lss  Enable the LSS services"
   163 		echo 	" --enable-lss  Enable the LSS services"
   161 		echo 	" --enable-lss-fs  Enable the LSS FastScan service"
   164 		echo 	" --enable-lss-fs  Enable the LSS FastScan service"
   162 		echo	" --disable-Ox  Disable gcc \"-Ox\" optimizations."
   165 		echo	" --disable-Ox  Disable gcc \"-Ox\" optimizations."
   163 		echo	" --debug=foo,foo,..   Enable debug messages, ERR -> only errors, WAR)."
   166 		echo	" --debug=foo,foo,..   Enable debug messages, ERR -> only errors, WAR)."
   483 
   486 
   484 ###########################################################################
   487 ###########################################################################
   485 #                           GUESS DEPENDENCIES                            #
   488 #                           GUESS DEPENDENCIES                            #
   486 ###########################################################################
   489 ###########################################################################
   487 
   490 
   488 if which wx-config >/dev/null 2>&1; then
   491 if [ "$SUB_WX" = "" ]; then
   489 	echo -n "Testing wxWidgets compiles ... "
   492 	if which wx-config >/dev/null 2>&1; then
   490 	cat > /tmp/wx_test.cpp <<EOF
   493 		echo -n "Testing wxWidgets compiles ... "
       
   494 		cat > /tmp/wx_test.cpp <<EOF
   491 #include "wx/wx.h"
   495 #include "wx/wx.h"
   492 class MyApp : public wxApp
   496 class MyApp : public wxApp
   493 {
   497 {
   494 };
   498 };
   495 IMPLEMENT_APP(MyApp)
   499 IMPLEMENT_APP(MyApp)
   496 EOF
   500 EOF
   497 	if $CXX /tmp/wx_test.cpp `wx-config --cxxflags` `wx-config --libs` -o /tmp/wx_test >/dev/null 2>&1 ; then
   501 		if $CXX /tmp/wx_test.cpp `wx-config --cxxflags` `wx-config --libs` -o /tmp/wx_test >/dev/null 2>&1 ; then
   498 		SUB_WX=1
   502 			SUB_WX=1
   499 		echo "Yes"
   503 			echo "Yes"
       
   504 		else
       
   505 			SUB_WX=0
       
   506 			echo "No"
       
   507 		fi
       
   508 		rm -f /tmp/wx_test*
   500 	else
   509 	else
   501 		SUB_WX=0
   510 		SUB_WX=0
   502 		echo "No"
   511 		echo "No wxWidgets available"
   503 	fi
   512 	fi
   504 	rm -f /tmp/wx_test*
   513 fi
   505 else
       
   506 	SUB_WX=0
       
   507 	echo "No wxWidgets available"
       
   508 fi
       
   509 
       
   510 ###########################################################################
   514 ###########################################################################
   511 #                   CANFESTIVAL DEFINES --> config.h                      #
   515 #                   CANFESTIVAL DEFINES --> config.h                      #
   512 ###########################################################################
   516 ###########################################################################
   513 # Some CONSTANTS preparation
   517 # Some CONSTANTS preparation
   514 
   518