Skip to content

Commit

Permalink
freetalk: Rework across the code
Browse files Browse the repository at this point in the history
- Gettext related changes avoid using "po" directory
- remove old argp related code add support for `argp-standalone`
- remove legacy broken code 'file_transfer.{c,h}'
- Do not expose jabber registration code, TODO
  • Loading branch information
Harshavardhana committed Apr 17, 2014
1 parent 1c91da8 commit 18c7ad8
Show file tree
Hide file tree
Showing 54 changed files with 7,647 additions and 1,082 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ config.guess
config.sub
config.status
configure
config.h.in
config.h
stamp-h1
depcomp
extensions/init.scm
extensions/first-time-run.sh
Expand Down Expand Up @@ -44,4 +47,5 @@ m4/
src/freetalk
po/[email protected]
po/[email protected]
po/remove-potcdate.sed
po/remove-potcdate.sed
contrib/argp-standalone/libargp.a
13 changes: 9 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
SUBDIRS = src extensions doc po examples
SUBDIRS = src extensions doc examples $(ARGP_STANDALONE_DIR)

PACKAGE = @PACKAGE@
VERSION = @VERSION@

ACLOCAL_AMFLAGS = -I m4

EXTRA_DIST = autogen.sh
EXTRA_DIST = autogen.sh contrib/argp-standalone

CLEANFILES = *~

Expand All @@ -16,3 +14,10 @@ gitclean: distclean
rm -f missing aclocal.m4 config.h.in config.guess
rm -f config.sub ltmain.sh install-sh configure depcomp
rm -f config.rpath INSTALL
-rm -fr $(CONTRIBDIR)/argp-standalone/autom4te.cache
-rm -f $(CONTRIBDIR)/argp-standalone/aclocal.m4
-rm -f $(CONTRIBDIR)/argp-standalone/config.h.in
-rm -f $(CONTRIBDIR)/argp-standalone/configure
-rm -f $(CONTRIBDIR)/argp-standalone/depcomp
-rm -f $(CONTRIBDIR)/argp-standalone/install-sh
-rm -f $(CONTRIBDIR)/argp-standalone/missing
18 changes: 9 additions & 9 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
TODO:
1. Fix the bug introduced by invisible mode during freetalk to freetalk communication.

1. Fix the bug introduced by invisible mode during freetalk to freetalk communication.
Gtalk to freetalk Invisible mode works properly due to some additional handling of
gtalk client from Google.

2. File transfer code cleanup, fix it for new jabber protocol for file transfer
2. File transfer code cleanup, fix it for new jabber protocol for file transfer
(Atleast fix it somehow :P)

3. Add new command like "/refresh" to get new list roster list from Jabber/Google server
and also atleast make it dynamic, as there is occasional hanging of the roster list
under invisible mode and other modes too.
3. Add new command like "/refresh" to get new list roster list from Jabber/Google server
and also atleast make it dynamic, as there is occasional hanging of the roster list
under invisible mode and other modes too.

4. Show idle if no activity on the terminal for 5 or more minutes.
4. Show idle if no activity on the terminal for 5 or more minutes.

5. Fix needed in handling of a notification of a statement "typing... " to be sent to Gtalk
while the user is typing some content to be sent on the terminal of freetalk.
5. Fix needed in handling of a notification of a statement "typing... " to be sent to Gtalk
while the user is typing some content to be sent on the terminal of freetalk.
82 changes: 77 additions & 5 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,79 @@
#!/bin/bash
autopoint -f
aclocal
autoconf
automake --add-missing

echo "Now run ./configure and make"
echo
echo ... GlusterFS autogen ...
echo

## Check all dependencies are present
MISSING=""

# Check for aclocal
env aclocal --version > /dev/null 2>&1
if [ $? -eq 0 ]; then
ACLOCAL=aclocal
else
MISSING="$MISSING aclocal"
fi

# Check for autoconf
env autoconf --version > /dev/null 2>&1
if [ $? -eq 0 ]; then
AUTOCONF=autoconf
else
MISSING="$MISSING autoconf"
fi

# Check for autoheader
env autoheader --version > /dev/null 2>&1
if [ $? -eq 0 ]; then
AUTOHEADER=autoheader
else
MISSING="$MISSING autoheader"
fi

# Check for automake
env automake --version > /dev/null 2>&1
if [ $? -eq 0 ]; then
AUTOMAKE=automake
else
MISSING="$MISSING automake"
fi

# Check for tar
env tar -cf /dev/null /dev/null > /dev/null 2>&1
if [ $? -ne 0 ]; then
MISSING="$MISSING tar"
fi

## If dependencies are missing, warn the user and abort
if [ "x$MISSING" != "x" ]; then
echo "Aborting."
echo
echo "The following build tools are missing:"
echo
for pkg in $MISSING; do
echo " * $pkg"
done
echo
echo "Please install them and try again."
echo
exit 1
fi

## Do the autogeneration
echo Running ${ACLOCAL}...
$ACLOCAL
echo Running ${AUTOHEADER}...
$AUTOHEADER
echo Running ${AUTOCONF}...
$AUTOCONF
echo Running ${AUTOMAKE}...
$AUTOMAKE --add-missing --copy --foreign

# Run autogen in the argp-standalone sub-directory
echo "Running autogen.sh in argp-standalone ..."
( cd contrib/argp-standalone;./autogen.sh )

# Instruct user on next steps
echo
echo "Please proceed with configuring, compiling, and installing."
45 changes: 26 additions & 19 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,36 @@ if libtool --help 2>&1 | grep -q quiet; then
AM_LIBTOOLFLAGS="--quiet";
fi

AC_CONFIG_SRCDIR([src/freetalk.c])
AC_CONFIG_HEADERS([config.h])

AC_CONFIG_FILES([Makefile src/Makefile extensions/Makefile extensions/init.scm extensions/first-time-run.sh doc/Makefile po/Makefile.in examples/Makefile])
AC_CONFIG_FILES([Makefile
src/Makefile
extensions/Makefile
extensions/init.scm
extensions/first-time-run.sh
doc/Makefile
examples/Makefile])

AC_PROG_MAKE_SET
AC_PROG_CXX

CONTRIBDIR='$(top_srcdir)/contrib'

dnl Check for argp
AC_CHECK_HEADER([argp.h], AC_DEFINE(HAVE_ARGP, 1, [have argp]))
AC_CONFIG_SUBDIRS(contrib/argp-standalone)

BUILD_ARGP_STANDALONE=no
if test "x${ac_cv_header_argp_h}" = "xno"; then
BUILD_ARGP_STANDALONE=yes
ARGP_STANDALONE_CFLAGS='-I${top_srcdir}/contrib/argp-standalone'
ARGP_STANDALONE_LDADD='${top_builddir}/contrib/argp-standalone/libargp.a'
ARGP_STANDALONE_DIR='${top_builddir}/contrib/argp-standalone'
fi

AC_SUBST(ARGP_STANDALONE_CFLAGS)
AC_SUBST(ARGP_STANDALONE_LDADD)

AC_CHECK_LIB([readline -lcurses],[readline],[RLLIBS="-lreadline -lcurses"])
AC_CHECK_LIB([readline -ltermcap],[readline],[RLLIBS="-lreadline -ltermcap"])
AC_CHECK_LIB([readline -lncurses],[readline],[RLLIBS="-lreadline -lncurses"])
Expand Down Expand Up @@ -58,22 +81,6 @@ if test "x$HAVE_LOUDMOUTH" == "xno"; then
AC_MSG_ERROR([ERROR! loudmouth-1.0 not found...])
fi

AC_CHECK_HEADER([argp.h],AC_DEFINE(HAVE_ARGP,[1]))

AC_CHECK_HEADERS([errno.h])
AC_CHECK_TYPES([error_t],
[],
[AC_DEFINE([error_t], [int])],
[#ifdef HAVE_ERRNO_H
#define __need_error_t
#include <errno.h>
#endif])

dnl Gettext Support
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.16.1])

dnl AM_PO_SUBDIRS
AM_ICONV
AC_CHECK_HEADERS([libintl.h])

AC_OUTPUT
38 changes: 38 additions & 0 deletions contrib/argp-standalone/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# From glibc

# Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
# This file is part of the GNU C Library.

# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.

# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.

# You should have received a copy of the GNU Library General Public
# License along with the GNU C Library; see the file COPYING.LIB. If
# not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
AUTOMAKE_OPTIONS = foreign
SUBDIRS = .

LIBOBJS = @LIBOBJS@

noinst_LIBRARIES = libargp.a

noinst_HEADERS = argp.h argp-fmtstream.h argp-namefrob.h

EXTRA_DIST = mempcpy.c strchrnul.c strndup.c strcasecmp.c vsnprintf.c autogen.sh

# Leaves out argp-fs-xinl.c and argp-xinl.c
libargp_a_SOURCES = argp-ba.c argp-eexst.c argp-fmtstream.c \
argp-help.c argp-parse.c argp-pv.c \
argp-pvh.c

libargp_a_LIBADD = $(LIBOBJS)


Loading

0 comments on commit 18c7ad8

Please sign in to comment.