From 212adf63ce136182524ee425293957345743cede Mon Sep 17 00:00:00 2001 From: hasufell Date: Sun, 31 Mar 2013 16:35:02 +0200 Subject: CONFIGURE: fix configure when gtk+ is not installed AM_PATH_GTK_2_0 would be an undefined macro then --- configure.ac | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index f4ceb031..62cb9292 100644 --- a/configure.ac +++ b/configure.ac @@ -199,14 +199,16 @@ dnl ********************************************************************* dnl ** GTK ************************************************************** dnl ********************************************************************* -AM_PATH_GTK_2_0(2.10.0, havegtk=yes, havegtk=no) - -if test "$havegtk" = no; then - gtkfe=no - echo - echo Cannot find GTK\! Not building GTK FrontEnd. - echo -fi +# we might get undefined macro without this test +if test "$gtkfe" = yes ; then + AM_PATH_GTK_2_0(2.10.0, havegtk=yes, havegtk=no) + + if test "$havegtk" = no; then + gtkfe=no + echo + echo Cannot find GTK\! Not building GTK FrontEnd. + echo + fi if test "$gtkfe" != yes; then gnome=no -- cgit 1.4.1 From 477bbbb340544548a4d33a8f207a247f52660e45 Mon Sep 17 00:00:00 2001 From: hasufell Date: Sun, 31 Mar 2013 16:52:20 +0200 Subject: CONFIGURE: don't enable gconf schemas when gtk is disabled This is nitpicky, since we could assume the user wants gconf schema if gconftool-2 is available. However this can be a wrong assumption. --- configure.ac | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 62cb9292..74c4394e 100644 --- a/configure.ac +++ b/configure.ac @@ -223,7 +223,6 @@ dnl ********************************************************************* GUI_LIBS="$GUI_LIBS $GTK_LIBS" GUI_CFLAGS="$GUI_CFLAGS $GTK_CFLAGS" -gnome=no #if test "$gnome" = yes; then # AC_PATH_PROG(pkgconfigpath, pkg-config) # AC_MSG_CHECKING(Gnome2 compile flags) @@ -241,7 +240,11 @@ gnome=no #fi # GConf -AC_PATH_PROG(GCONFTOOL, gconftool-2, no) +if test "$gnome" != no ; then + AC_PATH_PROG(GCONFTOOL, gconftool-2, no) +else + GCONFTOOL=no +fi dnl ********************************************************************* dnl ** XFT ************************************************************** -- cgit 1.4.1 From ae5d7e29e3dd3fe60007c718c5336875eec81081 Mon Sep 17 00:00:00 2001 From: hasufell Date: Sun, 31 Mar 2013 16:57:26 +0200 Subject: CONFIGURE: allow to pass specific python version This is useful if distros support installing multiple python versions in parallel such as: 2.5, 2.6, 2.7. For python3.* we will get syntax error during the imports, so the checks will successfully disable it. It defaults to python2. --- configure.ac | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 74c4394e..9b1a912d 100644 --- a/configure.ac +++ b/configure.ac @@ -114,8 +114,8 @@ AC_ARG_ENABLE(xlib, xlib=$enableval, xlib=yes) AC_ARG_ENABLE(python, - [AS_HELP_STRING([--disable-python],[don't build the python plugin])], - python=$enableval, python=yes) + [AS_HELP_STRING([--enable-python=pythonversion],[build the python plugin (default on, python2)])], + python=$enableval, python=python2) AC_ARG_ENABLE(perl, [AS_HELP_STRING([--disable-perl],[don't build the perl plugin])], @@ -333,9 +333,13 @@ dnl ********************************************************************* dnl ** PYTHON *********************************************************** dnl ********************************************************************* -if test "$python" = yes; then - AC_PATH_PROG(pythonpath, python2) - if test "_$pythonpath" = _ ; then +if test "x$python" != xno ; then + if test "$python" = yes ; then + # default + python="python2" + fi + AC_PATH_PROG(pythonpath, $python) + if test "_$pythonpath" = _ ; then AC_PATH_PROG(pythonpath, python) fi if test "_$pythonpath" = _ ; then @@ -363,7 +367,7 @@ if test "$python" = yes; then AC_MSG_RESULT([Can't find Python.h]) fi else - echo "Python too old. Only 2.2 or above is supported." + echo "Python is too old or too new. Only 2.2-2.7 are supported." python=no fi fi @@ -696,7 +700,7 @@ AM_CONDITIONAL(USE_LIBNOTIFY, test "x$libnotify" = "xyes") AM_CONDITIONAL(DO_TEXT, test "x$textfe" = "xyes") AM_CONDITIONAL(DO_GTK, test "x$gtkfe" = "xyes") AM_CONDITIONAL(DO_PERL, test "x$perl" = "xyes") -AM_CONDITIONAL(DO_PYTHON, test "x$python" = "xyes") +AM_CONDITIONAL(DO_PYTHON, test "x$python" != "xno") dnl AM_CONDITIONAL(DO_TCL, test "x$tcl" = "xyes") AM_CONDITIONAL(DO_PLUGIN, test "x$plugin" = "xyes") AM_CONDITIONAL(DO_CHECKSUM, test "x$checksum" = "xyes") -- cgit 1.4.1 From 9ae63cf05d99865d03ddbcdf9f083d825fa212a4 Mon Sep 17 00:00:00 2001 From: hasufell Date: Sun, 31 Mar 2013 16:59:49 +0200 Subject: MAKE: don't include icons and desktop file for non-gtk builds --- share/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/Makefile.am b/share/Makefile.am index f265b88e..6d143b61 100644 --- a/share/Makefile.am +++ b/share/Makefile.am @@ -1 +1,3 @@ +if DO_GTK SUBDIRS = icons misc +endif -- cgit 1.4.1 From 83a59968171ae53a787108e03027799b6b03266b Mon Sep 17 00:00:00 2001 From: hasufell Date: Sun, 31 Mar 2013 17:01:56 +0200 Subject: MAKE: install hexchat-plugin.h header if plugins are enabled --- src/common/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 3be3b1c6..7b5612dd 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -52,6 +52,10 @@ libhexchatcommon_a_LIBADD = \ endif SUBDIRS = $(dbusdir) . +if DO_PLUGIN +include_HEADERS = hexchat-plugin.h +endif + libhexchatcommon_a_SOURCES = cfgfiles.c chanopt.c ctcp.c dcc.c hexchat.c \ history.c ignore.c inbound.c modes.c msproxy.c network.c notify.c \ outbound.c plugin.c plugin-timer.c proto-irc.c server.c servlist.c \ -- cgit 1.4.1