[Mplayerplug-in-cvs] mplayerplug-in configure,1.6,1.7 configure.in,1.6,1.7
Brought to you by:
kdekorte
From: <kde...@us...> - 2004-02-20 22:18:30
|
Update of /cvsroot/mplayerplug-in/mplayerplug-in In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24014 Modified Files: configure configure.in Log Message: Configure changes to support gtk1 when it is coded up Index: configure =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/configure,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** configure 20 Feb 2004 19:55:45 -0000 1.6 --- configure 20 Feb 2004 22:07:04 -0000 1.7 *************** *** 858,861 **** --- 858,863 ---- --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-gtk2 Disable the use of gtk2 toolkit + --enable-gtk1 Enable the use of gtk1 toolkit. Disable gtk2 + --enable-x Enable the use of X toolkit. Disable gtk1 and gtk2 Optional Packages: *************** *** 2717,2720 **** --- 2719,2750 ---- use_gtk2=yes fi; + # Check whether --enable-gtk1 or --disable-gtk1 was given. + if test "${enable_gtk1+set}" = set; then + enableval="$enable_gtk1" + if test "$enableval" = ""; then use_gtk1=yes; else use_gtk1=$enableval; fi + else + use_gtk1=no + fi; + # Check whether --enable-x or --disable-x was given. + if test "${enable_x+set}" = set; then + enableval="$enable_x" + if test "$enableval" = ""; then use_x=yes; else use_x=$enableval; fi + else + use_x=no + fi; + + echo "use_x = $use_x" + echo "use_gtk1 = $use_gtk1" + echo "use_gtk2 = $use_gtk2" + + if test $use_x = yes; then + use_gtk2=no + use_gtk1=no + fi + + if test $use_gtk1 = yes; then + use_gtk2=no + fi + if test $use_gtk2 = yes; then *************** *** 2816,2821 **** fi - #PKG_CHECK_MODULES(GTK2,[gtk+],,[AC_MSG_ERROR([gtk2 development packages are not found])]) --- 2846,2949 ---- fi + if test $use_gtk1 = yes; then + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. + set dummy pkg-config; ac_word=$2 + echo "$as_me:$LINENO: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; + esac + fi + PKG_CONFIG=$ac_cv_path_PKG_CONFIG + + if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + echo "${ECHO_T}$PKG_CONFIG" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 + fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or set the PKG_CONFIG environment variable" + echo "*** to the full path to pkg-config." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo "$as_me:$LINENO: checking for gtk+" >&5 + echo $ECHO_N "checking for gtk+... $ECHO_C" >&6 + + if $PKG_CONFIG --exists "gtk+" ; then + echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6 + succeeded=yes + + echo "$as_me:$LINENO: checking GTK2_CFLAGS" >&5 + echo $ECHO_N "checking GTK2_CFLAGS... $ECHO_C" >&6 + GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+"` + echo "$as_me:$LINENO: result: $GTK2_CFLAGS" >&5 + echo "${ECHO_T}$GTK2_CFLAGS" >&6 + + echo "$as_me:$LINENO: checking GTK2_LIBS" >&5 + echo $ECHO_N "checking GTK2_LIBS... $ECHO_C" >&6 + GTK2_LIBS=`$PKG_CONFIG --libs "gtk+"` + echo "$as_me:$LINENO: result: $GTK2_LIBS" >&5 + echo "${ECHO_T}$GTK2_LIBS" >&6 + else + GTK2_CFLAGS="" + GTK2_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + GTK2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + GTK_DEFINES="-DGTK1_ENABLED" + else + { echo "$as_me:$LINENO: WARNING: gtk+ development packages are not found" >&5 + echo "$as_me: WARNING: gtk+ development packages are not found" >&2;} + fi + + fi Index: configure.in =================================================================== RCS file: /cvsroot/mplayerplug-in/mplayerplug-in/configure.in,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** configure.in 20 Feb 2004 19:55:45 -0000 1.6 --- configure.in 20 Feb 2004 22:07:04 -0000 1.7 *************** *** 33,41 **** AC_HELP_STRING([--disable-gtk2], [Disable the use of gtk2 toolkit]), [use_gtk2=$enableval], [use_gtk2=yes]) if test $use_gtk2 = yes; then PKG_CHECK_MODULES(GTK2,[gtk+-2.0],[GTK_DEFINES="-DGTK2_ENABLED"],[AC_MSG_WARN([Running in X mode])]) fi - #PKG_CHECK_MODULES(GTK2,[gtk+],,[AC_MSG_ERROR([gtk2 development packages are not found])]) AC_SUBST(GTK2_CFLAGS) AC_SUBST(GTK2_LIBS) --- 33,63 ---- AC_HELP_STRING([--disable-gtk2], [Disable the use of gtk2 toolkit]), [use_gtk2=$enableval], [use_gtk2=yes]) + AC_ARG_ENABLE(gtk1, + AC_HELP_STRING([--enable-gtk1], [Enable the use of gtk1 toolkit. Disable gtk2]), + [if test "$enableval" = ""; then use_gtk1=yes; else use_gtk1=$enableval; fi], [use_gtk1=no]) + AC_ARG_ENABLE(x, + AC_HELP_STRING([--enable-x], [Enable the use of X toolkit. Disable gtk1 and gtk2]), + [if test "$enableval" = ""; then use_x=yes; else use_x=$enableval; fi], [use_x=no]) + + echo "use_x = $use_x" + echo "use_gtk1 = $use_gtk1" + echo "use_gtk2 = $use_gtk2" + + if test $use_x = yes; then + use_gtk2=no + use_gtk1=no + fi + + if test $use_gtk1 = yes; then + use_gtk2=no + fi + if test $use_gtk2 = yes; then PKG_CHECK_MODULES(GTK2,[gtk+-2.0],[GTK_DEFINES="-DGTK2_ENABLED"],[AC_MSG_WARN([Running in X mode])]) fi + if test $use_gtk1 = yes; then + PKG_CHECK_MODULES(GTK2,[gtk+],[GTK_DEFINES="-DGTK1_ENABLED"],[AC_MSG_WARN([gtk+ development packages are not found])]) + fi AC_SUBST(GTK2_CFLAGS) AC_SUBST(GTK2_LIBS) |