mirror of
https://github.com/irssi/irssi.git
synced 2025-04-27 13:31:14 -05:00
Command line argument handling works.
-c server [-p port] : connects to server at startup -n : don't autoconnect to any servers git-svn-id: http://svn.irssi.org/repos/irssi/trunk@33 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
69546b19de
commit
9ccee0a31b
19
acconfig.h
19
acconfig.h
@ -1,17 +1,22 @@
|
|||||||
#undef HAVE_GTK
|
|
||||||
#undef HAVE_GNOME
|
|
||||||
#undef HAVE_GNOME_PANEL
|
|
||||||
#undef SYSCONFDIR
|
#undef SYSCONFDIR
|
||||||
#undef PLUGINSDIR
|
#undef PLUGINSDIR
|
||||||
#undef PERLSCRIPTDIR
|
#undef PERLSCRIPTDIR
|
||||||
#undef GTK_10
|
|
||||||
#undef HAVE_SOCKS_H
|
#undef HAVE_GTK
|
||||||
#undef HAVE_IMLIB
|
#undef HAVE_IMLIB
|
||||||
#undef MEM_DEBUG
|
#undef HAVE_GNOME
|
||||||
#undef HAVE_IPV6
|
#undef HAVE_GNOME_PANEL
|
||||||
|
|
||||||
#undef GTK_HEBREW
|
#undef GTK_HEBREW
|
||||||
#undef GTK_HEBREW_RC
|
#undef GTK_HEBREW_RC
|
||||||
|
|
||||||
|
#undef MEM_DEBUG
|
||||||
|
#undef HAVE_IPV6
|
||||||
|
|
||||||
|
#undef HAVE_POPT_H
|
||||||
|
#undef HAVE_POPT_GNOME_H
|
||||||
|
#undef HAVE_SOCKS_H
|
||||||
|
|
||||||
#undef HAVE_NCURSES_USE_DEFAULT_COLORS
|
#undef HAVE_NCURSES_USE_DEFAULT_COLORS
|
||||||
#undef HAVE_CURSES_IDCOK
|
#undef HAVE_CURSES_IDCOK
|
||||||
|
|
||||||
|
44
configure.in
44
configure.in
@ -182,6 +182,38 @@ AM_CONDITIONAL(BUILD_SERVERTEST, test "x$want_servertest" = "xyes")
|
|||||||
AC_DEFINE_UNQUOTED(SYSCONFDIR, "$prefix/etc")
|
AC_DEFINE_UNQUOTED(SYSCONFDIR, "$prefix/etc")
|
||||||
AC_DEFINE_UNQUOTED(PLUGINSDIR, "$prefix/lib/irssi/plugins")
|
AC_DEFINE_UNQUOTED(PLUGINSDIR, "$prefix/lib/irssi/plugins")
|
||||||
|
|
||||||
|
dnl **
|
||||||
|
dnl ** check for popt.h
|
||||||
|
dnl **
|
||||||
|
if test "x$popt_dir" = "x"; then
|
||||||
|
AC_CHECK_HEADER(popt.h, [
|
||||||
|
AC_DEFINE(HAVE_POPT_H)
|
||||||
|
LIBS="-lpopt"
|
||||||
|
])
|
||||||
|
else
|
||||||
|
poptlib=-L$popt_dir/lib
|
||||||
|
CFLAGS="$CFLAGS -I$popt_dir/include"
|
||||||
|
LIBS="$LIBS $poptlib -lpopt"
|
||||||
|
if test -f $popt_dir/include/popt.h; then
|
||||||
|
AC_DEFINE(HAVE_POPT_H)
|
||||||
|
else
|
||||||
|
if test -f $popt_dir/include/popt-gnome.h; then
|
||||||
|
AC_DEFINE(HAVE_POPT_GNOME_H)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_CHECK_LIB(popt, poptGetContext, [
|
||||||
|
POPT_LIBS="$poptlib -lpopt"
|
||||||
|
], [
|
||||||
|
AC_CHECK_LIB(gnomesupport, poptGetContext, [
|
||||||
|
POPT_LIBS="$poptlib $GNOME_LIBDIR -lgnomesupport"
|
||||||
|
], [
|
||||||
|
AC_ERROR(["libpropt or libgnomesupport not found"])
|
||||||
|
], $LIBS $poptlib $GNOME_LIBDIR -lgnomesupport)
|
||||||
|
], $LIBS $poptlib -lpopt)
|
||||||
|
|
||||||
|
|
||||||
dnl **
|
dnl **
|
||||||
dnl ** check for libPropList
|
dnl ** check for libPropList
|
||||||
dnl **
|
dnl **
|
||||||
@ -237,8 +269,11 @@ if test "x$want_gnome" = "xyes"; then
|
|||||||
AC_DEFINE(HAVE_GTK)
|
AC_DEFINE(HAVE_GTK)
|
||||||
AC_DEFINE(HAVE_GNOME)
|
AC_DEFINE(HAVE_GNOME)
|
||||||
AC_DEFINE(HAVE_IMLIB)
|
AC_DEFINE(HAVE_IMLIB)
|
||||||
|
AC_DEFINE(HAVE_POPT_GNOME_H)
|
||||||
GNOME_SUPPORT_CHECKS
|
GNOME_SUPPORT_CHECKS
|
||||||
GUI_CFLAGS="$GNOME_INCLUDEDIR"
|
|
||||||
|
dnl ** needed for including popt-gnome.h
|
||||||
|
CFLAGS="$CFLAGS $GNOME_INCLUDEDIR"
|
||||||
|
|
||||||
dnl **
|
dnl **
|
||||||
dnl ** check for gnome panel applet library
|
dnl ** check for gnome panel applet library
|
||||||
@ -260,13 +295,9 @@ else
|
|||||||
want_gnome_panel="no"
|
want_gnome_panel="no"
|
||||||
AC_DEFINE(HAVE_GTK)
|
AC_DEFINE(HAVE_GTK)
|
||||||
AM_PATH_GTK(1.2.0)
|
AM_PATH_GTK(1.2.0)
|
||||||
GUI_CFLAGS="$GTK_CFLAGS"
|
GUI_CFLAGS="$GTK_CFLAGS $POPT_LIBS"
|
||||||
GUI_LIBS="$GTK_LIBS"
|
GUI_LIBS="$GTK_LIBS"
|
||||||
|
|
||||||
if test "x$gtk_config_minor_version" = "x0"; then
|
|
||||||
AC_DEFINE(GTK_10)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$want_imlib" = "xyes"; then
|
if test "x$want_imlib" = "xyes"; then
|
||||||
AM_PATH_GDK_IMLIB(, [define_imlib=true])
|
AM_PATH_GDK_IMLIB(, [define_imlib=true])
|
||||||
if test x$define_imlib = xtrue; then
|
if test x$define_imlib = xtrue; then
|
||||||
@ -281,6 +312,7 @@ if test "x$GUI_LIBS" != "x"; then
|
|||||||
GUI_LIBS="$GUI_LIBS $HEBREW_LIBS"
|
GUI_LIBS="$GUI_LIBS $HEBREW_LIBS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(POPT_LIBS)
|
||||||
AC_SUBST(GUI_LIBS)
|
AC_SUBST(GUI_LIBS)
|
||||||
AC_SUBST(GUI_CFLAGS)
|
AC_SUBST(GUI_CFLAGS)
|
||||||
AM_CONDITIONAL(BUILD_GNOMEUI, test "x$GUI_LIBS" != "x")
|
AM_CONDITIONAL(BUILD_GNOMEUI, test "x$GUI_LIBS" != "x")
|
||||||
|
38
src/common.h
38
src/common.h
@ -26,6 +26,14 @@
|
|||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_POPT_H
|
||||||
|
#include <popt.h>
|
||||||
|
#else
|
||||||
|
# ifdef HAVE_POPT_GNOME_H
|
||||||
|
# include <popt-gnome.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
@ -60,6 +68,7 @@ typedef struct
|
|||||||
}
|
}
|
||||||
IPADDR;
|
IPADDR;
|
||||||
|
|
||||||
|
#include "irc-base/memdebug.h"
|
||||||
#include "lib-config/irssi-config.h"
|
#include "lib-config/irssi-config.h"
|
||||||
#include "common-setup.h"
|
#include "common-setup.h"
|
||||||
|
|
||||||
@ -82,33 +91,4 @@ void gui_input_remove(gint tag);
|
|||||||
guint gui_timeout_add(guint32 interval, GUITimeoutFunction function, gpointer data);
|
guint gui_timeout_add(guint32 interval, GUITimeoutFunction function, gpointer data);
|
||||||
void gui_timeout_remove(gint tag);
|
void gui_timeout_remove(gint tag);
|
||||||
|
|
||||||
#ifdef MEM_DEBUG
|
|
||||||
|
|
||||||
void ig_mem_profile(void);
|
|
||||||
|
|
||||||
void ig_set_data(gchar *data);
|
|
||||||
|
|
||||||
gpointer ig_malloc(gint size, gchar *file, gint line);
|
|
||||||
gpointer ig_malloc0(gint size, gchar *file, gint line);
|
|
||||||
gpointer ig_realloc(gpointer mem, gulong size, gchar *file, gint line);
|
|
||||||
gchar *ig_strdup(const char *str, gchar *file, gint line);
|
|
||||||
gchar *ig_strconcat(const char *str, ...);
|
|
||||||
gchar *ig_strdup_printf(const gchar *format, ...) G_GNUC_PRINTF (1, 2);
|
|
||||||
void ig_free(gpointer p);
|
|
||||||
GString *ig_string_new(gchar *str);
|
|
||||||
void ig_string_free(GString *str, gboolean freeit);
|
|
||||||
|
|
||||||
#define g_malloc(a) ig_malloc(a, __FILE__, __LINE__)
|
|
||||||
#define g_malloc0(a) ig_malloc0(a, __FILE__, __LINE__)
|
|
||||||
#define g_realloc(a,b) ig_realloc(a, b, __FILE__, __LINE__)
|
|
||||||
#define g_strdup(a) ig_strdup(a, __FILE__, __LINE__)
|
|
||||||
#define g_strconcat ig_strconcat
|
|
||||||
#define g_strdup_printf ig_strdup_printf
|
|
||||||
#define g_strdup_vprintf ig_strdup_vprintf
|
|
||||||
#define g_free ig_free
|
|
||||||
#define g_string_new ig_string_new
|
|
||||||
#define g_string_free ig_string_free
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user