[asterisk-commits] russell: branch russell/gmenuselect r58945 - in /team/russell/gmenuselect: ./...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Mar 15 16:42:38 MST 2007


Author: russell
Date: Thu Mar 15 18:42:37 2007
New Revision: 58945

URL: http://svn.digium.com/view/asterisk?view=rev&rev=58945
Log:
Add configure script checking for gtk2

Modified:
    team/russell/gmenuselect/Makefile
    team/russell/gmenuselect/configure
    team/russell/gmenuselect/configure.ac
    team/russell/gmenuselect/include/asterisk/autoconfig.h.in
    team/russell/gmenuselect/makeopts.in
    team/russell/gmenuselect/menuselect/Makefile

Modified: team/russell/gmenuselect/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/gmenuselect/Makefile?view=diff&rev=58945&r1=58944&r2=58945
==============================================================================
--- team/russell/gmenuselect/Makefile (original)
+++ team/russell/gmenuselect/Makefile Thu Mar 15 18:42:37 2007
@@ -64,6 +64,8 @@
 export NCURSES_DIR
 export TERMCAP_DIR
 export TINFO_DIR
+export GTK2_INCLUDE
+export GTK2_LIB
 
 # even though we could use '-include makeopts' here, use a wildcard
 # lookup anyway, so that make won't try to build makeopts if it doesn't

Modified: team/russell/gmenuselect/configure
URL: http://svn.digium.com/view/asterisk/team/russell/gmenuselect/configure?view=diff&rev=58945&r1=58944&r2=58945
==============================================================================
--- team/russell/gmenuselect/configure (original)
+++ team/russell/gmenuselect/configure Thu Mar 15 18:42:37 2007
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 58866 .
+# From configure.ac Revision: 58944 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.60.
 #
@@ -900,6 +900,10 @@
 PBX_GTK
 GTK_INCLUDE
 GTK_LIB
+PKGCONFIG
+PBX_GTK2
+GTK2_INCLUDE
+GTK2_LIB
 CURL_CONFIG
 LTLIBOBJS'
 ac_subst_files=''
@@ -38843,6 +38847,117 @@
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_GTK 1
+_ACEOF
+
+fi
+
+
+
+
+PBX_GTK2=0
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}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_prog_PKGCONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$PKGCONFIG"; then
+  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_PKGCONFIG="${ac_tool_prefix}pkg-config"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+PKGCONFIG=$ac_cv_prog_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+  { echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
+echo "${ECHO_T}$PKGCONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_PKGCONFIG"; then
+  ac_ct_PKGCONFIG=$PKGCONFIG
+  # 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_prog_ac_ct_PKGCONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_PKGCONFIG"; then
+  ac_cv_prog_ac_ct_PKGCONFIG="$ac_ct_PKGCONFIG" # Let the user override the test.
+else
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_PKGCONFIG="pkg-config"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_PKGCONFIG=$ac_cv_prog_ac_ct_PKGCONFIG
+if test -n "$ac_ct_PKGCONFIG"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_PKGCONFIG" >&5
+echo "${ECHO_T}$ac_ct_PKGCONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_PKGCONFIG" = x; then
+    PKGCONFIG="No"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKGCONFIG=$ac_ct_PKGCONFIG
+  fi
+else
+  PKGCONFIG="$ac_cv_prog_PKGCONFIG"
+fi
+
+if test ! "x${PKGCONFIG}" = xNo; then
+   GTK2_INCLUDE=$(${PKGCONFIG} gtk+-2.0 --cflags)
+   GTK2_LIB=$(${PKGCONFIG} gtk+-2.0 --libs)
+   PBX_GTK2=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GTK2 1
 _ACEOF
 
 fi
@@ -40023,11 +40138,15 @@
 PBX_GTK!$PBX_GTK$ac_delim
 GTK_INCLUDE!$GTK_INCLUDE$ac_delim
 GTK_LIB!$GTK_LIB$ac_delim
+PKGCONFIG!$PKGCONFIG$ac_delim
+PBX_GTK2!$PBX_GTK2$ac_delim
+GTK2_INCLUDE!$GTK2_INCLUDE$ac_delim
+GTK2_LIB!$GTK2_LIB$ac_delim
 CURL_CONFIG!$CURL_CONFIG$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 9; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 13; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: team/russell/gmenuselect/configure.ac
URL: http://svn.digium.com/view/asterisk/team/russell/gmenuselect/configure.ac?view=diff&rev=58945&r1=58944&r2=58945
==============================================================================
--- team/russell/gmenuselect/configure.ac (original)
+++ team/russell/gmenuselect/configure.ac Thu Mar 15 18:42:37 2007
@@ -981,6 +981,18 @@
 AC_SUBST(GTK_INCLUDE)
 AC_SUBST(GTK_LIB)
 
+PBX_GTK2=0
+AC_CHECK_TOOL(PKGCONFIG, pkg-config, No)
+if test ! "x${PKGCONFIG}" = xNo; then
+   GTK2_INCLUDE=$(${PKGCONFIG} gtk+-2.0 --cflags)
+   GTK2_LIB=$(${PKGCONFIG} gtk+-2.0 --libs)
+   PBX_GTK2=1
+   AC_DEFINE([HAVE_GTK2], 1, [Define if your system has the GTK2 libraries.])
+fi
+AC_SUBST(PBX_GTK2)
+AC_SUBST(GTK2_INCLUDE)
+AC_SUBST(GTK2_LIB)
+
 if test "${USE_CURL}" != "no"; then
    AC_PATH_TOOL([CURL_CONFIG], [curl-config], No)
    if test ! x"${CURL_CONFIG}" = xNo; then

Modified: team/russell/gmenuselect/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/russell/gmenuselect/include/asterisk/autoconfig.h.in?view=diff&rev=58945&r1=58944&r2=58945
==============================================================================
--- team/russell/gmenuselect/include/asterisk/autoconfig.h.in (original)
+++ team/russell/gmenuselect/include/asterisk/autoconfig.h.in Thu Mar 15 18:42:37 2007
@@ -167,6 +167,9 @@
 
 /* Define if your system has the GTK libraries. */
 #undef HAVE_GTK
+
+/* Define if your system has the GTK2 libraries. */
+#undef HAVE_GTK2
 
 /* Define this to indicate the ${IKSEMEL_DESCRIP} library */
 #undef HAVE_IKSEMEL

Modified: team/russell/gmenuselect/makeopts.in
URL: http://svn.digium.com/view/asterisk/team/russell/gmenuselect/makeopts.in?view=diff&rev=58945&r1=58944&r2=58945
==============================================================================
--- team/russell/gmenuselect/makeopts.in (original)
+++ team/russell/gmenuselect/makeopts.in Thu Mar 15 18:42:37 2007
@@ -83,6 +83,9 @@
 
 GTK_INCLUDE=@GTK_INCLUDE@
 GTK_LIB=@GTK_LIB@
+
+GTK2_INCLUDE=@GTK2_INCLUDE@
+GTK2_LIB=@GTK2_LIB@
 
 IKSEMEL_INCLUDE=@IKSEMEL_INCLUDE@
 IKSEMEL_LIB=@IKSEMEL_LIB@

Modified: team/russell/gmenuselect/menuselect/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/gmenuselect/menuselect/Makefile?view=diff&rev=58945&r1=58944&r2=58945
==============================================================================
--- team/russell/gmenuselect/menuselect/Makefile (original)
+++ team/russell/gmenuselect/menuselect/Makefile Thu Mar 15 18:42:37 2007
@@ -18,8 +18,11 @@
 MENUSELECT_LIBS:=mxml/libmxml.a
 
 GMENUSELECT_OBJS:=menuselect.o menuselect_gtk.o strcompat.o
-GMENUSELECT_CFLAGS:=$(shell pkg-config gtk+-2.0 --cflags)
-GMENUSELECT_LIBS:=mxml/libmxml.a $(shell pkg-config gtk+-2.0 --libs)
+ifeq ($(GTK2_LIB),)
+  GMENUSELECT_OBJS:=$(filter-out menuselect_gtk.o,$(GMENUSELECT_OBJS)) menuselect_stub.o
+endif
+GMENUSELECT_CFLAGS:=$(GTK2_INCLUDE)
+GMENUSELECT_LIBS:=mxml/libmxml.a $(GTK2_LIB)
 
 -include makeopts
 



More information about the asterisk-commits mailing list