From: <ma...@us...> - 2003-12-12 10:36:14
|
Update of /cvsroot/sharedaemon/ui-wx In directory sc8-pr-cvs1:/tmp/cvs-serv22770 Modified Files: configure Log Message: --disable-colours switch and wxGTK2 check+warning Index: configure =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/configure,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- configure 12 Dec 2003 09:12:18 -0000 1.2 +++ configure 12 Dec 2003 10:36:10 -0000 1.3 @@ -19,12 +19,6 @@ #!/bin/sh -colour_default="\33[0;2m" -colour_yes="\33[32;22m" -colour_no="\33[31;22m" -colour_output="\33[35;1m" -colour_warning="\33[36;1m" - ## # Checks for ccache (compiler cache) availability # @@ -98,6 +92,21 @@ } ## +# Checks if wxWindows library was linked against GTK2 +# +function check_wxgtk2() { + echo -e -n "checking if wxWindows was linked against GTK2..."; + if $wxconfig --cppflags | grep -q 'gtk2' ; then + echo -e "${colour_no}yes${colour_default}"; + echo -e "\t${colour_warning}GTK2 support in wxWindows is currently only experimental,${colour_default}"; + echo -e "\t${colour_warning}thus it is not officially supported in this application${colour_default}"; + echo -e "\t${colour_warning}either. You have been warned, continue on your own risc.${colour_default}"; + else + echo -e "${colour_yes}no${colour_default}"; + fi; +} + +## # Outputs error message about wx-config not being found, and prints suggestions. # function not_found() { @@ -136,8 +145,21 @@ echo "creating Makefile"; cp -f Makefile.am Makefile; echo "creating src/Makefile"; - echo "# Automatically generated by configure - from Makefile.am" \ - "do not modify!" > src/Makefile; + echo "" > src/Makefile; + echo "# Automatically generated by configure - from Makefile.am do not modify!" > src/Makefile + if test $colours = 1; then + echo "# Colours" >> src/Makefile + echo "DEFAULTCOLOR =\33[0;22m" >> src/Makefile + echo "ACTIONCOLOR = \33[0;2m" >> src/Makefile + echo "ATTENTIONCOLOR=\33[31;22m" >> src/Makefile + echo "WARNINGCOLOR =\33[33;22m" >> src/Makefile + echo "NOTICEGCOLOR =\33[33;2m" >> src/Makefile + echo "WELLCOLOR =\33[32;22m" >> src/Makefile + echo "OUTPUTCOLOR =\33[35;1m" >> src/Makefile + echo "INPUTCOLOR =\33[34;1m" >> src/Makefile + echo "FLAGCOLOR =\33[37;1m" >> src/Makefile + fi; + sed -e "\ s#@CXX@#$ccache `$wxconfig --cxx`#; \ s#@CXX_FLAGS@#`$wxconfig --cxxflags`#; \ @@ -163,6 +185,7 @@ profile=0; show_flags=0; patch_sizer=0; + colours=1; while test $# -gt 0; do case $1 in @@ -211,6 +234,12 @@ --hide-flags) show_flags=0; ;; + --disable-colours) + colours=0; + ;; + --enable-colours) + colours=1; + ;; *) print_help; ;; @@ -218,6 +247,18 @@ shift; done; + echo -e -n "checking for --disable-colours\t\t\t"; + if test $colours = 1; then + colour_default="\33[0;2m" + colour_yes="\33[32;22m" + colour_no="\33[31;22m" + colour_output="\33[35;1m" + colour_warning="\33[36;1m" + echo -e "${colour_yes}no${colour_default}"; + else + echo -e "yes"; + fi; + echo -e "checking for --with-wx-config\t\t\t$wxconfig"; echo -e "checking for --prefix\t\t\t\t$prefix"; echo -e "checking for --include-dir\t\t\t$include_dir"; @@ -252,7 +293,9 @@ cppflags="$cppflags -D__HAVE_REMOVE_GROWABLE_COL__" else echo -e "${colour_no}no${colour_default}"; - echo -e "\t${colour_warning}Warning: Sidebar hiding code will be disabled.${colour_default}"; + echo -e "\t${colour_warning}Warning: Sidebar hiding code will be disabled. To enable${colour_default}"; + echo -e "\t${colour_warning}it, patch wxWindows with flexgridsizer.patch, recompile${colour_default}"; + echo -e "\t${colour_warning}it and re-run this configure with --has-patched-sizer.${colour_default}"; fi; echo -e -n "checking for --show-flags\t\t\t"; @@ -279,6 +322,7 @@ --has-patched-wxsizer wxWindows is patched with flexgridsizer patch ( enables sidebar hiding code ) --show-flags Enable printing compilation/link flags + --disable-colours Disable colours in configure/make output EOF exit 0; } @@ -289,7 +333,8 @@ parse_cmdline $@; check_wxconfig; check_wxversion; +check_wxgtk2; check_ccache; gen_makefile; -echo -e "configure complete. Now type \33[35;1mmake\33[0;2m and pray."; +echo -e "configure complete. Now type ${colour_output}make${colour_default} and pray."; |