From: <ma...@us...> - 2003-12-20 09:17:48
|
Update of /cvsroot/sharedaemon/ui-wx In directory sc8-pr-cvs1:/tmp/cvs-serv14725 Modified Files: configure Log Message: Checks for pkg-config now (needed for compilation against wxGTK2) Index: configure =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/configure,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- configure 20 Dec 2003 08:51:28 -0000 1.8 +++ configure 20 Dec 2003 09:17:45 -0000 1.9 @@ -51,6 +51,9 @@ --with-gtk-config=*) gtkconfig=$optarg; ;; + --with-pkg-config=*) + pkgconfig=$optarg; + ;; --prefix=*) prefix=$optarg; ;; @@ -162,7 +165,7 @@ if test -x $wxconfig; then wxconfig=$wxconfig; elif test -x `which wx-config 2>/dev/null`; then - wxconfig=`which wx-config`; + wxconfig=`which wx-config 2>/dev/null`; elif test -x /usr/local/bin/wx-config; then wxconfig=/usr/local/bin/wx-config; elif test -x /usr/bin/wx-config; then @@ -242,6 +245,7 @@ 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}"; cppflags="$cppflags -D__GTK2__" + gtk2=1; else echo -e "${colour_yes}no${colour_default}"; fi; @@ -266,6 +270,9 @@ if test -x $gtkconfig; then gtkconfig=$gtkconfig; has_gtk=1; + elif test -x `which gtk-config 2>/dev/null`; then + gtkconfig=`which gtk-config 2>/dev/null`; + has_gtk=1; elif test -x /usr/local/bin/gtk-config; then gtkconfig=/usr/local/bin/gtk-config; has_gtk=1; @@ -291,8 +298,35 @@ has_gtk=0; fi; if test $has_gtk = 1; then - echo -e "${colour_yes}\t\t\tyes${colour_default}"; + echo -e "${colour_yes}\t\t\t$gtkconfig${colour_default}"; fi; + + if test $gtk2 = 1; then + echo -e -n "checking for pkg-config..."; + if test -x $pkgconfig; then + pkgconfig=$pkgconfig; + has_pkgconfig=1; + elif test -x `which pkg-config 2>/dev/null`; then + pkgconfig=`which pkg-config 2>/dev/null`; + has_pkgconfig=1; + else + echo -e "$(colour_no)no$(colour_warning)"; + cat << EOF +wxWindows was linked against GTK2, but GTK2 devel tools (pkg-config) +were not found. If you have GTK2 (pkg-config) installed in a custom +location, rerun configure with --with-pkg-config=PREFIX. +GTK systray will be disabled. +EOF + echo -e "$(default_color)"; + has_gtk=0; + fi; + fi; + if test $has_gtk = 1; then + if test $has_pkgconfig = 1; then + echo -e "$(colour_yes)\t\t\t$pkgconfig$(colour_default)"; + fi; + fi; + fi; } @@ -347,12 +381,14 @@ linkflags=`$wxconfig --libs`; - if test $has_gtk = 1; then - cppflags="$cppflags -D__HAS_GTK_CONFIG__"; - tray_objs="TrayCoreEngine.o"; - cflags="`$gtkconfig --cflags`"; - cppflags="$cppflags `$gtkconfig --cflags`"; - linkflags="$linkflags `$gtkconfig --libs`"; + if $wxconfig --cppflags | grep -q 'gtk'; then + if test $has_gtk = 1; then + cppflags="$cppflags -D__HAS_GTK_CONFIG__"; + tray_objs="TrayCoreEngine.o"; + cflags="`$gtkconfig --cflags`"; + cppflags="$cppflags `$gtkconfig --cflags`"; + linkflags="$linkflags `$gtkconfig --libs`"; + fi; fi; if test $show_flags = 1; then @@ -400,6 +436,7 @@ --help Print this message and return to shell --with-wx-config=DIR Specify the location of wx-config script --with-gtk-config=DIR Specify the location of gtk-config + --with-pkg-config=DIR Specify the location of pkg-config --enable-optimise Optimize code ( recommended for users) --enable-debug Enable debugging ( recommended for devs) --enable-profile Enable profiling ( recommended for devs) |