summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-07-30 23:25:12 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-07-30 23:25:12 +0000
commit34ee7e407695f858c94b0c3c379c4d30759431f6 (patch)
tree012cadf79290d8e18a1a1a8da4f969950353e65e
parentb11f2b2c4bfd91a82c5b1bea0555d8b0b68cd682 (diff)
downloadweechat-34ee7e407695f858c94b0c3c379c4d30759431f6.zip
Fixed compilation problems under Irix
-rw-r--r--configure.in40
-rw-r--r--doc/de/Makefile.am4
-rw-r--r--doc/en/Makefile.am4
-rw-r--r--doc/fr/Makefile.am4
-rw-r--r--src/common/backtrace.c7
-rw-r--r--src/gui/curses/gui-curses-keyboard.c2
-rw-r--r--src/gui/curses/gui-curses.h4
-rw-r--r--weechat/configure.in40
-rw-r--r--weechat/doc/de/Makefile.am4
-rw-r--r--weechat/doc/en/Makefile.am4
-rw-r--r--weechat/doc/fr/Makefile.am4
-rw-r--r--weechat/src/common/backtrace.c7
-rw-r--r--weechat/src/gui/curses/gui-curses-keyboard.c2
-rw-r--r--weechat/src/gui/curses/gui-curses.h4
14 files changed, 86 insertions, 44 deletions
diff --git a/configure.in b/configure.in
index 6b9871afa..a16ee2f50 100644
--- a/configure.in
+++ b/configure.in
@@ -142,8 +142,8 @@ if test "x$enable_ncurses" = "xyes" ; then
fi
else
NCURSES_LIBS="-lncursesw"
- AC_CHECK_HEADERS(ncursesw/curses.h)
fi
+ AC_CHECK_HEADERS([ncurses.h ncursesw/curses.h])
AC_SUBST(NCURSES_LIBS)
fi
@@ -668,15 +668,25 @@ AC_DEFINE_UNQUOTED(WEECHAT_SHAREDIR, "$WEECHAT_SHAREDIR")
weechat_libdir=${libdir}/weechat
AC_SUBST(weechat_libdir)
+
+COMMON_CFLAGS="-Wall -W"
+AC_MSG_CHECKING([whether we have GNU assembler])
+GAS=`as --version < /dev/null 2>/dev/null | grep GNU`
+if test "$GAS"; then
+ COMMON_CFLAGS="${COMMON_CFLAGS} -pipe"
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
CFLAGS=`echo $CFLAGS | sed s/-g//g`
if test "x$CFLAGS" = "x" ; then
CFLAGS="-O2"
fi
if test "x$debug" = "x1" || test "x$debug" = "x2" ; then
- CFLAGS="-Wall -W $CFLAGS -pipe -g"
+ CFLAGS="$COMMON_CFLAGS $CFLAGS -g"
else
- CFLAGS="-Wall -W $CFLAGS -pipe"
+ CFLAGS="$COMMON_CFLAGS $CFLAGS"
fi
if test "x$debug" = "x2" ; then
@@ -716,18 +726,18 @@ esac
# output Makefiles
# ------------------------------------------------------------------------------
-AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
-AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes")
-AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
-AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
-AM_CONDITIONAL(PLUGINS, test "$enable_plugins" = "yes")
-AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
-AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
-AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
-AM_CONDITIONAL(PLUGIN_LUA, test "$enable_lua" = "yes")
-AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
-AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
-AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
+AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
+AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes")
+AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
+AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
+AM_CONDITIONAL(PLUGINS, test "$enable_plugins" = "yes")
+AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
+AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
+AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
+AM_CONDITIONAL(PLUGIN_LUA, test "$enable_lua" = "yes")
+AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
+AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
+AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
AC_OUTPUT([Makefile
doc/Makefile
diff --git a/doc/de/Makefile.am b/doc/de/Makefile.am
index 421190e46..8e5720c49 100644
--- a/doc/de/Makefile.am
+++ b/doc/de/Makefile.am
@@ -31,7 +31,7 @@ all-local: html-stamp
html: html-stamp
html-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html.xsl ../weechat-doc.css
- echo "<pubdate>`date -R`</pubdate>" >date.xml
+ echo "<pubdate>`date '+%F %T'`</pubdate>" >date.xml
mkdir -p html/
xsltproc -o html/ ../weechat-html.xsl $(BOOK).xml || true
cp ../weechat-doc.css html/
@@ -42,7 +42,7 @@ html-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html.xsl ../weechat-doc.css
html1: html1-stamp
html1-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html-one.xsl ../weechat-doc.css
- echo "<pubdate>`date -R`</pubdate>" >date.xml
+ echo "<pubdate>`date '+%F %T'`</pubdate>" >date.xml
mkdir -p html1/
xsltproc -o html1/$(BOOK).html ../weechat-html-one.xsl $(BOOK).xml || true
cp ../weechat-doc.css html1/
diff --git a/doc/en/Makefile.am b/doc/en/Makefile.am
index f5baa0674..8ac87052a 100644
--- a/doc/en/Makefile.am
+++ b/doc/en/Makefile.am
@@ -31,7 +31,7 @@ all-local: html-stamp
html: html-stamp
html-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html.xsl ../weechat-doc.css
- echo "<pubdate>`date -R`</pubdate>" >date.xml
+ echo "<pubdate>`date '+%F %T'`</pubdate>" >date.xml
mkdir -p html/
xsltproc -o html/ ../weechat-html.xsl $(BOOK).xml || true
cp ../weechat-doc.css html/
@@ -42,7 +42,7 @@ html-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html.xsl ../weechat-doc.css
html1: html1-stamp
html1-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html-one.xsl ../weechat-doc.css
- echo "<pubdate>`date -R`</pubdate>" >date.xml
+ echo "<pubdate>`date '+%F %T'`</pubdate>" >date.xml
mkdir -p html1/
xsltproc -o html1/$(BOOK).html ../weechat-html-one.xsl $(BOOK).xml || true
cp ../weechat-doc.css html1/
diff --git a/doc/fr/Makefile.am b/doc/fr/Makefile.am
index 2693cfccd..568a2fca7 100644
--- a/doc/fr/Makefile.am
+++ b/doc/fr/Makefile.am
@@ -31,7 +31,7 @@ all-local: html-stamp
html: html-stamp
html-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html.xsl ../weechat-doc.css
- echo "<pubdate>`date -R`</pubdate>" >date.xml
+ echo "<pubdate>`date '+%F %T'`</pubdate>" >date.xml
mkdir -p html/
xsltproc -o html/ ../weechat-html.xsl $(BOOK).xml || true
cp ../weechat-doc.css html/
@@ -42,7 +42,7 @@ html-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html.xsl ../weechat-doc.css
html1: html1-stamp
html1-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html-one.xsl ../weechat-doc.css
- echo "<pubdate>`date -R`</pubdate>" >date.xml
+ echo "<pubdate>`date '+%F %T'`</pubdate>" >date.xml
mkdir -p html1/
xsltproc -o html1/$(BOOK).html ../weechat-html-one.xsl $(BOOK).xml || true
cp ../weechat-doc.css html1/
diff --git a/src/common/backtrace.c b/src/common/backtrace.c
index 747918296..8b76720bf 100644
--- a/src/common/backtrace.c
+++ b/src/common/backtrace.c
@@ -65,6 +65,7 @@ weechat_backtrace_printf (char *message, ...)
void
weechat_backtrace_addr2line (int number, void *address, char *symbol)
{
+#ifdef HAVE_BACKTRACE
int rc;
Dl_info info;
const void *addr;
@@ -129,6 +130,12 @@ weechat_backtrace_addr2line (int number, void *address, char *symbol)
weechat_backtrace_printf ("%03d %s\n",
number, function_name);
pclose (output);
+#else
+ /* make gcc happy */
+ (void) number;
+ (void) address;
+ (void) symbol;
+#endif
}
/*
diff --git a/src/gui/curses/gui-curses-keyboard.c b/src/gui/curses/gui-curses-keyboard.c
index db9f563bd..dbd3c8840 100644
--- a/src/gui/curses/gui-curses-keyboard.c
+++ b/src/gui/curses/gui-curses-keyboard.c
@@ -220,8 +220,10 @@ gui_keyboard_read ()
break;
}
+#ifdef KEY_RESIZE
if (key == KEY_RESIZE)
continue;
+#endif
gui_last_activity_time = time (NULL);
diff --git a/src/gui/curses/gui-curses.h b/src/gui/curses/gui-curses.h
index 804b3bb0f..d187780fb 100644
--- a/src/gui/curses/gui-curses.h
+++ b/src/gui/curses/gui-curses.h
@@ -23,8 +23,10 @@
#ifdef HAVE_NCURSESW_CURSES_H
#include <ncursesw/ncurses.h>
-#else
+#elif HAVE_NCURSES_H
#include <ncurses.h>
+#else
+#include <curses.h>
#endif
/* shift ncurses colors for compatibility with colors
diff --git a/weechat/configure.in b/weechat/configure.in
index 6b9871afa..a16ee2f50 100644
--- a/weechat/configure.in
+++ b/weechat/configure.in
@@ -142,8 +142,8 @@ if test "x$enable_ncurses" = "xyes" ; then
fi
else
NCURSES_LIBS="-lncursesw"
- AC_CHECK_HEADERS(ncursesw/curses.h)
fi
+ AC_CHECK_HEADERS([ncurses.h ncursesw/curses.h])
AC_SUBST(NCURSES_LIBS)
fi
@@ -668,15 +668,25 @@ AC_DEFINE_UNQUOTED(WEECHAT_SHAREDIR, "$WEECHAT_SHAREDIR")
weechat_libdir=${libdir}/weechat
AC_SUBST(weechat_libdir)
+
+COMMON_CFLAGS="-Wall -W"
+AC_MSG_CHECKING([whether we have GNU assembler])
+GAS=`as --version < /dev/null 2>/dev/null | grep GNU`
+if test "$GAS"; then
+ COMMON_CFLAGS="${COMMON_CFLAGS} -pipe"
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
CFLAGS=`echo $CFLAGS | sed s/-g//g`
if test "x$CFLAGS" = "x" ; then
CFLAGS="-O2"
fi
if test "x$debug" = "x1" || test "x$debug" = "x2" ; then
- CFLAGS="-Wall -W $CFLAGS -pipe -g"
+ CFLAGS="$COMMON_CFLAGS $CFLAGS -g"
else
- CFLAGS="-Wall -W $CFLAGS -pipe"
+ CFLAGS="$COMMON_CFLAGS $CFLAGS"
fi
if test "x$debug" = "x2" ; then
@@ -716,18 +726,18 @@ esac
# output Makefiles
# ------------------------------------------------------------------------------
-AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
-AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes")
-AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
-AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
-AM_CONDITIONAL(PLUGINS, test "$enable_plugins" = "yes")
-AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
-AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
-AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
-AM_CONDITIONAL(PLUGIN_LUA, test "$enable_lua" = "yes")
-AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
-AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
-AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
+AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
+AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes")
+AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
+AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
+AM_CONDITIONAL(PLUGINS, test "$enable_plugins" = "yes")
+AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
+AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
+AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
+AM_CONDITIONAL(PLUGIN_LUA, test "$enable_lua" = "yes")
+AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
+AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
+AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
AC_OUTPUT([Makefile
doc/Makefile
diff --git a/weechat/doc/de/Makefile.am b/weechat/doc/de/Makefile.am
index 421190e46..8e5720c49 100644
--- a/weechat/doc/de/Makefile.am
+++ b/weechat/doc/de/Makefile.am
@@ -31,7 +31,7 @@ all-local: html-stamp
html: html-stamp
html-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html.xsl ../weechat-doc.css
- echo "<pubdate>`date -R`</pubdate>" >date.xml
+ echo "<pubdate>`date '+%F %T'`</pubdate>" >date.xml
mkdir -p html/
xsltproc -o html/ ../weechat-html.xsl $(BOOK).xml || true
cp ../weechat-doc.css html/
@@ -42,7 +42,7 @@ html-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html.xsl ../weechat-doc.css
html1: html1-stamp
html1-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html-one.xsl ../weechat-doc.css
- echo "<pubdate>`date -R`</pubdate>" >date.xml
+ echo "<pubdate>`date '+%F %T'`</pubdate>" >date.xml
mkdir -p html1/
xsltproc -o html1/$(BOOK).html ../weechat-html-one.xsl $(BOOK).xml || true
cp ../weechat-doc.css html1/
diff --git a/weechat/doc/en/Makefile.am b/weechat/doc/en/Makefile.am
index f5baa0674..8ac87052a 100644
--- a/weechat/doc/en/Makefile.am
+++ b/weechat/doc/en/Makefile.am
@@ -31,7 +31,7 @@ all-local: html-stamp
html: html-stamp
html-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html.xsl ../weechat-doc.css
- echo "<pubdate>`date -R`</pubdate>" >date.xml
+ echo "<pubdate>`date '+%F %T'`</pubdate>" >date.xml
mkdir -p html/
xsltproc -o html/ ../weechat-html.xsl $(BOOK).xml || true
cp ../weechat-doc.css html/
@@ -42,7 +42,7 @@ html-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html.xsl ../weechat-doc.css
html1: html1-stamp
html1-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html-one.xsl ../weechat-doc.css
- echo "<pubdate>`date -R`</pubdate>" >date.xml
+ echo "<pubdate>`date '+%F %T'`</pubdate>" >date.xml
mkdir -p html1/
xsltproc -o html1/$(BOOK).html ../weechat-html-one.xsl $(BOOK).xml || true
cp ../weechat-doc.css html1/
diff --git a/weechat/doc/fr/Makefile.am b/weechat/doc/fr/Makefile.am
index 2693cfccd..568a2fca7 100644
--- a/weechat/doc/fr/Makefile.am
+++ b/weechat/doc/fr/Makefile.am
@@ -31,7 +31,7 @@ all-local: html-stamp
html: html-stamp
html-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html.xsl ../weechat-doc.css
- echo "<pubdate>`date -R`</pubdate>" >date.xml
+ echo "<pubdate>`date '+%F %T'`</pubdate>" >date.xml
mkdir -p html/
xsltproc -o html/ ../weechat-html.xsl $(BOOK).xml || true
cp ../weechat-doc.css html/
@@ -42,7 +42,7 @@ html-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html.xsl ../weechat-doc.css
html1: html1-stamp
html1-stamp: $(BOOK).xml $(BOOK_INCLUDE) ../weechat-html-one.xsl ../weechat-doc.css
- echo "<pubdate>`date -R`</pubdate>" >date.xml
+ echo "<pubdate>`date '+%F %T'`</pubdate>" >date.xml
mkdir -p html1/
xsltproc -o html1/$(BOOK).html ../weechat-html-one.xsl $(BOOK).xml || true
cp ../weechat-doc.css html1/
diff --git a/weechat/src/common/backtrace.c b/weechat/src/common/backtrace.c
index 747918296..8b76720bf 100644
--- a/weechat/src/common/backtrace.c
+++ b/weechat/src/common/backtrace.c
@@ -65,6 +65,7 @@ weechat_backtrace_printf (char *message, ...)
void
weechat_backtrace_addr2line (int number, void *address, char *symbol)
{
+#ifdef HAVE_BACKTRACE
int rc;
Dl_info info;
const void *addr;
@@ -129,6 +130,12 @@ weechat_backtrace_addr2line (int number, void *address, char *symbol)
weechat_backtrace_printf ("%03d %s\n",
number, function_name);
pclose (output);
+#else
+ /* make gcc happy */
+ (void) number;
+ (void) address;
+ (void) symbol;
+#endif
}
/*
diff --git a/weechat/src/gui/curses/gui-curses-keyboard.c b/weechat/src/gui/curses/gui-curses-keyboard.c
index db9f563bd..dbd3c8840 100644
--- a/weechat/src/gui/curses/gui-curses-keyboard.c
+++ b/weechat/src/gui/curses/gui-curses-keyboard.c
@@ -220,8 +220,10 @@ gui_keyboard_read ()
break;
}
+#ifdef KEY_RESIZE
if (key == KEY_RESIZE)
continue;
+#endif
gui_last_activity_time = time (NULL);
diff --git a/weechat/src/gui/curses/gui-curses.h b/weechat/src/gui/curses/gui-curses.h
index 804b3bb0f..d187780fb 100644
--- a/weechat/src/gui/curses/gui-curses.h
+++ b/weechat/src/gui/curses/gui-curses.h
@@ -23,8 +23,10 @@
#ifdef HAVE_NCURSESW_CURSES_H
#include <ncursesw/ncurses.h>
-#else
+#elif HAVE_NCURSES_H
#include <ncurses.h>
+#else
+#include <curses.h>
#endif
/* shift ncurses colors for compatibility with colors