Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3099 in orxonox.OLD


Ignore:
Timestamp:
Dec 5, 2004, 1:56:37 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: configure.ac: more compatible check for GTK2.0

Location:
orxonox/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/Makefile.in

    r2991 r3099  
    118118PACKAGE_VERSION = @PACKAGE_VERSION@
    119119PATH_SEPARATOR = @PATH_SEPARATOR@
    120 PKG_CONFIG = @PKG_CONFIG@
    121120SET_MAKE = @SET_MAKE@
    122121SHELL = @SHELL@
  • orxonox/trunk/aclocal.m4

    r2991 r3099  
    1111# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
    1212# PARTICULAR PURPOSE.
    13 
    14 
    15 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
    16 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
    17 dnl also defines GSTUFF_PKG_ERRORS on error
    18 AC_DEFUN(PKG_CHECK_MODULES, [
    19   succeeded=no
    20 
    21   if test -z "$PKG_CONFIG"; then
    22     AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
    23   fi
    24 
    25   if test "$PKG_CONFIG" = "no" ; then
    26      echo "*** The pkg-config script could not be found. Make sure it is"
    27      echo "*** in your path, or set the PKG_CONFIG environment variable"
    28      echo "*** to the full path to pkg-config."
    29      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
    30   else
    31      PKG_CONFIG_MIN_VERSION=0.9.0
    32      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
    33         AC_MSG_CHECKING(for $2)
    34 
    35         if $PKG_CONFIG --exists "$2" ; then
    36             AC_MSG_RESULT(yes)
    37             succeeded=yes
    38 
    39             AC_MSG_CHECKING($1_CFLAGS)
    40             $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
    41             AC_MSG_RESULT($$1_CFLAGS)
    42 
    43             AC_MSG_CHECKING($1_LIBS)
    44             $1_LIBS=`$PKG_CONFIG --libs "$2"`
    45             AC_MSG_RESULT($$1_LIBS)
    46         else
    47             $1_CFLAGS=""
    48             $1_LIBS=""
    49             ## If we have a custom action on failure, don't print errors, but
    50             ## do set a variable so people can do so.
    51             $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
    52             ifelse([$4], ,echo $$1_PKG_ERRORS,)
    53         fi
    54 
    55         AC_SUBST($1_CFLAGS)
    56         AC_SUBST($1_LIBS)
    57      else
    58         echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
    59         echo "*** See http://www.freedesktop.org/software/pkgconfig"
    60      fi
    61   fi
    62 
    63   if test $succeeded = yes; then
    64      ifelse([$3], , :, [$3])
    65   else
    66      ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
    67   fi
    68 ])
    69 
    70 
    7113
    7214#                                                        -*- Autoconf -*-
  • orxonox/trunk/configure

    r3001 r3099  
    312312#endif"
    313313
    314 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP MSBITFIELDS PKG_CONFIG GTK2_CFLAGS GTK2_LIBS HAVE_GTK2_TRUE HAVE_GTK2_FALSE LIBOBJS LTLIBOBJS'
     314ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP MSBITFIELDS GTK2_LIBS GTK2_CFLAGS HAVE_GTK2_TRUE HAVE_GTK2_FALSE LIBOBJS LTLIBOBJS'
    315315ac_subst_files=''
    316316
     
    58015801
    58025802## checking for GTK
    5803 
    5804   succeeded=no
    5805 
    5806   if test -z "$PKG_CONFIG"; then
    5807     # Extract the first word of "pkg-config", so it can be a program name with args.
    5808 set dummy pkg-config; ac_word=$2
    5809 echo "$as_me:$LINENO: checking for $ac_word" >&5
    5810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
    5811 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
    5812   echo $ECHO_N "(cached) $ECHO_C" >&6
    5813 else
    5814   case $PKG_CONFIG in
    5815   [\\/]* | ?:[\\/]*)
    5816   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
    5817   ;;
    5818   *)
    5819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    5820 for as_dir in $PATH
    5821 do
    5822   IFS=$as_save_IFS
    5823   test -z "$as_dir" && as_dir=.
    5824   for ac_exec_ext in '' $ac_executable_extensions; do
    5825   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    5826     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    5827     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    5828     break 2
    5829   fi
    5830 done
    5831 done
    5832 
    5833   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
    5834   ;;
    5835 esac
    5836 fi
    5837 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
    5838 
    5839 if test -n "$PKG_CONFIG"; then
    5840   echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
    5841 echo "${ECHO_T}$PKG_CONFIG" >&6
    5842 else
    5843   echo "$as_me:$LINENO: result: no" >&5
    5844 echo "${ECHO_T}no" >&6
    5845 fi
    5846 
    5847   fi
    5848 
    5849   if test "$PKG_CONFIG" = "no" ; then
    5850      echo "*** The pkg-config script could not be found. Make sure it is"
    5851      echo "*** in your path, or set the PKG_CONFIG environment variable"
    5852      echo "*** to the full path to pkg-config."
    5853      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
    5854   else
    5855      PKG_CONFIG_MIN_VERSION=0.9.0
    5856      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
    5857         echo "$as_me:$LINENO: checking for gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3" >&5
    5858 echo $ECHO_N "checking for gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3... $ECHO_C" >&6
    5859 
    5860         if $PKG_CONFIG --exists "gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3" ; then
    5861             echo "$as_me:$LINENO: result: yes" >&5
    5862 echo "${ECHO_T}yes" >&6
    5863             succeeded=yes
    5864 
    5865             echo "$as_me:$LINENO: checking GTK2_CFLAGS" >&5
    5866 echo $ECHO_N "checking GTK2_CFLAGS... $ECHO_C" >&6
    5867             GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3"`
    5868             echo "$as_me:$LINENO: result: $GTK2_CFLAGS" >&5
    5869 echo "${ECHO_T}$GTK2_CFLAGS" >&6
    5870 
    5871             echo "$as_me:$LINENO: checking GTK2_LIBS" >&5
    5872 echo $ECHO_N "checking GTK2_LIBS... $ECHO_C" >&6
    5873             GTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3"`
    5874             echo "$as_me:$LINENO: result: $GTK2_LIBS" >&5
    5875 echo "${ECHO_T}$GTK2_LIBS" >&6
    5876         else
    5877             GTK2_CFLAGS=""
    5878             GTK2_LIBS=""
    5879             ## If we have a custom action on failure, don't print errors, but
    5880             ## do set a variable so people can do so.
    5881             GTK2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3"`
    5882 
    5883         fi
    5884 
    5885 
    5886 
    5887      else
    5888         echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
    5889         echo "*** See http://www.freedesktop.org/software/pkgconfig"
    5890      fi
    5891   fi
    5892 
    5893   if test $succeeded = yes; then
    5894      have_gtk2=yes
    5895   else
    5896      have_gtk2=no
    5897   fi
    5898 
     5803#PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     5804echo "$as_me:$LINENO: checking for gtk2.0" >&5
     5805echo $ECHO_N "checking for gtk2.0... $ECHO_C" >&6
     5806if `pkg-config --exists gtk+-2.0`; then
     5807  echo "yes"
     5808  have_gtk2=yes
     5809  GTK2_LIBS=`pkg-config --libs gtk+-2.0`
     5810  GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
     5811else
     5812  echo "no"
     5813fi
    58995814
    59005815
     
    75797494s,@EGREP@,$EGREP,;t t
    75807495s,@MSBITFIELDS@,$MSBITFIELDS,;t t
    7581 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
     7496s,@GTK2_LIBS@,$GTK2_LIBS,;t t
    75827497s,@GTK2_CFLAGS@,$GTK2_CFLAGS,;t t
    7583 s,@GTK2_LIBS@,$GTK2_LIBS,;t t
    75847498s,@HAVE_GTK2_TRUE@,$HAVE_GTK2_TRUE,;t t
    75857499s,@HAVE_GTK2_FALSE@,$HAVE_GTK2_FALSE,;t t
  • orxonox/trunk/configure.ac

    r3001 r3099  
    207207
    208208## checking for GTK
    209 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     209#PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.3 gthread-2.0 >= 2.0.3, have_gtk2=yes, have_gtk2=no)
     210AC_MSG_CHECKING([for gtk2.0])
     211if `pkg-config --exists gtk+-2.0`; then
     212  echo "yes"
     213  have_gtk2=yes
     214  GTK2_LIBS=`pkg-config --libs gtk+-2.0`
     215  GTK2_CFLAGS=`pkg-config --cflags gtk+-2.0`
     216else
     217  echo "no"
     218fi
    210219AC_SUBST(GTK2_LIBS)
    211220AC_SUBST(GTK2_CFLAGS)
     
    223232 AC_CHECK_LIB([m], [main])
    224233
    225 
     234 
    226235# Checks for header files.
    227236AC_HEADER_STDC
  • orxonox/trunk/console/Makefile.in

    r2991 r3099  
    121121PACKAGE_VERSION = @PACKAGE_VERSION@
    122122PATH_SEPARATOR = @PATH_SEPARATOR@
    123 PKG_CONFIG = @PKG_CONFIG@
    124123SET_MAKE = @SET_MAKE@
    125124SHELL = @SHELL@
     
    425424
    426425
    427 #  uncomment the following if bencoder requires the math library
     426#  uncomment the following if orxonox requires the math library
    428427#gui_LDADD=-lm
    429428
  • orxonox/trunk/gui/Makefile.in

    r2991 r3099  
    127127PACKAGE_VERSION = @PACKAGE_VERSION@
    128128PATH_SEPARATOR = @PATH_SEPARATOR@
    129 PKG_CONFIG = @PKG_CONFIG@
    130129SET_MAKE = @SET_MAKE@
    131130SHELL = @SHELL@
     
    178177noinst_HEADERS = orxonox_gui.h orxonox_gui_video.h orxonox_gui_audio.h orxonox_gui_exec.h orxonox_gui_flags.h orxonox_gui_banner.h orxonox_gui_keys.h
    179178
    180 #  uncomment the following if bencoder requires the math library
     179#  uncomment the following if orxonox requires the math library
    181180#gui_LDADD=-lm
    182181
  • orxonox/trunk/importer/Makefile.in

    r3063 r3099  
    121121PACKAGE_VERSION = @PACKAGE_VERSION@
    122122PATH_SEPARATOR = @PATH_SEPARATOR@
    123 PKG_CONFIG = @PKG_CONFIG@
    124123SET_MAKE = @SET_MAKE@
    125124SHELL = @SHELL@
  • orxonox/trunk/src/Makefile.in

    r3027 r3099  
    136136PACKAGE_VERSION = @PACKAGE_VERSION@
    137137PATH_SEPARATOR = @PATH_SEPARATOR@
    138 PKG_CONFIG = @PKG_CONFIG@
    139138SET_MAKE = @SET_MAKE@
    140139SHELL = @SHELL@
Note: See TracChangeset for help on using the changeset viewer.