Skip to content

Commit

Permalink
Created the project.
Browse files Browse the repository at this point in the history
  • Loading branch information
artob committed Sep 18, 2013
0 parents commit 94c86a5
Show file tree
Hide file tree
Showing 38 changed files with 379 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.DS_Store
.tmp/
pkg/
tmp/
*~

# GNU Autotools
etc/aclocal/
Makefile
Makefile.in
aclocal.m4
autom4te.cache/
config.log
config.status
configure
libtool
stamp-h1
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: cpp
compiler:
- clang
- gcc
before_install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -qq
- sudo apt-get install -qq libboost-test1.48-dev
- if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
before_script:
- ./autogen.sh
script:
- ./configure && make && make check
branches:
only:
- master
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Arto Bendiken <[email protected]>
Empty file added CREDITS
Empty file.
3 changes: 3 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SUBDIRS = lib src test #doc
EXTRA_DIST = AUTHORS CREDITS README UNLICENSE VERSION
ACLOCAL_AMFLAGS = -I etc/aclocal
1 change: 1 addition & 0 deletions README
49 changes: 49 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
libcli++
========

.. image:: https://travis-ci.org/datagraph/libcli.png?branch=master
:target: https://travis-ci.org/datagraph/libcli
:align: right
:alt: Travis CI build status

Build Prerequisites
-------------------

* Clang_ (>= 3.0) or GCC_ (>= 4.7)
* Autoconf_ (>= 2.68)
* Automake_ (>= 1.11)
* Libtool_ (>= 2.2)

.. _Clang: http://clang.llvm.org/
.. _GCC: http://gcc.gnu.org/
.. _Autoconf: http://www.gnu.org/software/autoconf/
.. _Automake: http://www.gnu.org/software/automake/
.. _Libtool: http://www.gnu.org/software/libtool/

Build Dependencies
------------------

* Boost.Test_ (>= 1.48) for ``make check`` unit tests only

.. _Boost.Test: http://www.boost.org/libs/test/

Installation on Unix
--------------------

::

$ ./autogen.sh
$ ./configure # on Linux
$ ./configure --with-stdlib=libc++ # on FreeBSD / Mac OS X
$ make
$ sudo make install
$ sudo ldconfig # on Linux

Elsewhere
---------

Find the project at: GitHub_, Bitbucket_, and `Travis CI`_.

.. _GitHub: http://github.com/datagraph/libcli
.. _Bitbucket: http://bitbucket.org/datagraph/libcli
.. _Travis CI: http://travis-ci.org/datagraph/libcli
Empty file added TODO
Empty file.
24 changes: 24 additions & 0 deletions UNLICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.0
2 changes: 2 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
autoreconf --force --install
102 changes: 102 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
dnl configure.ac -*- Autoconf -*-
dnl
dnl Process this file with `autoconf` to produce a configure script.
dnl
dnl This is free and unencumbered software released into the public domain.
AC_PREREQ([2.68])

dnl Define version information:
m4_define([VERSION_MAJOR],
m4_esyscmd([cut -d'.' -f1 VERSION | tr -d '\n']))
m4_define([VERSION_MINOR],
m4_esyscmd([cut -d'.' -f2 VERSION | tr -d '\n']))
m4_define([VERSION_PATCH],
m4_esyscmd([cut -d'.' -f3 VERSION | tr -d '\n']))
m4_define([VERSION_STRING],
m4_esyscmd([git describe --dirty --always | tr -d '\n']))

dnl Define package information:
AC_INIT([libcli++], [VERSION_STRING],
[[email protected]], [libcli++],
[https://github.com/datagraph/libcli])

dnl Configure Autoconf:
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_SRCDIR([src/cli++.h])
AC_CONFIG_AUX_DIR([etc/aclocal])
AC_CONFIG_MACRO_DIR([etc/aclocal])
AC_CONFIG_LIBOBJ_DIR([lib])

dnl Configure Automake:
AM_INIT_AUTOMAKE([foreign -Wall -Werror dist-bzip2 subdir-objects nostdinc])
AM_SILENT_RULES([yes])

dnl Check for programs:
AC_PROG_CC(clang gcc cc)
AC_PROG_CPP
AC_PROG_CXX(clang++ g++ c++)
AC_PROG_CXXCPP
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
LT_INIT
AC_LANG([C++])
dnl AX_CXX_COMPILE_STDCXX_11([noext])

dnl Check for configuration options:
# --with-stdlib=libstdc++|libc++
AC_ARG_WITH([stdlib],
[AS_HELP_STRING([--with-stdlib=LIB], [specify the C++ standard library to use [default=system]])],
[], [with_stdlib=system])
AS_IF([test "x$with_stdlib" != "xsystem"],
[CXXFLAGS="$CXXFLAGS -stdlib=$with_stdlib"
LDFLAGS="$LDFLAGS -stdlib=$with_stdlib"])
# --enable-debug/--disable-debug
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug], [build with debugging support [default=no]])],
[], [enable_debug=no])
AS_IF([test "x$enable_debug" != "xno"],
[AC_DEFINE([DEBUG], [1], [Enable debugging support.])],
[AC_DEFINE([NDEBUG], [1], [Disable assertions.])])
AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" != "xno"])
# --enable-unicode/--disable-unicode
AC_ARG_ENABLE([unicode],
[AS_HELP_STRING([--disable-unicode], [omit support for Unicode strings])])
AS_IF([test "x$enable_unicode" == "xno"],
[AC_DEFINE([DISABLE_UNICODE], 1, [Define to disable Unicode string support.])])

dnl Check for libraries:
# libboost (libboost-dev on Ubuntu, boost on Mac OS X + MacPorts)
dnl AX_BOOST_BASE([1.48], [AX_BOOST_UNIT_TEST_FRAMEWORK])

dnl Check for header files:

dnl Check for types:

dnl Check for structures:

dnl Check for compiler characteristics:
AC_CANONICAL_HOST
AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)/lib -I\$(top_srcdir)/src -iquote \$(srcdir)"
AM_CXXFLAGS="$AM_CXXFLAGS -Wall -Wextra -pipe"
AM_LDFLAGS="$AM_LDFLAGS"
TEST_CPPFLAGS="$AM_CPPFLAGS -DBOOST_TEST_DYN_LINK"
TEST_CXXFLAGS="$AM_CXXFLAGS"
TEST_LDFLAGS="$AM_LDFLAGS \$(BOOST_UNIT_TEST_FRAMEWORK_LIB)"
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_LDFLAGS])
AC_SUBST([TEST_CPPFLAGS])
AC_SUBST([TEST_CXXFLAGS])
AC_SUBST([TEST_LDFLAGS])

dnl Check for library functions:

dnl Check for system services:

dnl Generate output:
AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile src/cli++/Makefile test/Makefile])
AC_SUBST([PACKAGE_VERSION_MAJOR], ["VERSION_MAJOR"])
AC_SUBST([PACKAGE_VERSION_MINOR], ["VERSION_MINOR"])
AC_SUBST([PACKAGE_VERSION_PATCH], ["VERSION_PATCH"])
AC_CONFIG_FILES([src/cli++/version.h])
AH_BOTTOM([#include "libcompat.h"])
AC_OUTPUT
10 changes: 10 additions & 0 deletions configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#/bin/sh
#export CC='ccache gcc -std=c11'
#export CXX='ccache g++ -std=c++11'
export CC='ccache clang -std=c11 -Qunused-arguments -fcolor-diagnostics'
export CXX='ccache clang++ -std=c++11 -Qunused-arguments -fcolor-diagnostics'
export CPPFLAGS=''
export CFLAGS='-g -Os'
export CXXFLAGS="$CFLAGS"
export LDFLAGS=''
./configure $*
Empty file added doc/doxygen/.gitkeep
Empty file.
Empty file added doc/examples/.gitkeep
Empty file.
Empty file added doc/manual/.gitkeep
Empty file.
7 changes: 7 additions & 0 deletions etc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
doap.html
doap.json
doap.jsonld
doap.nq
doap.nt
doap.ttl
doap.xml
Empty file added etc/aclocal/.gitkeep
Empty file.
Empty file added etc/debian/.gitkeep
Empty file.
Empty file added etc/doap.rdf
Empty file.
Empty file added etc/macports/.gitkeep
Empty file.
7 changes: 7 additions & 0 deletions lib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.deps/
.libs/
.dirstamp
*.a
*.o
*.la
*.lo
Empty file added lib/Makefile.am
Empty file.
Empty file added lib/libcompat.h
Empty file.
3 changes: 3 additions & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
config.h
config.h.in
config.h.in~
3 changes: 3 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SUBDIRS = cli++

include_HEADERS = cli++.h
14 changes: 14 additions & 0 deletions src/cli++.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* This is free and unencumbered software released into the public domain. */

#ifndef CLIXX_H
#define CLIXX_H

/**
* libcli++
*/

#include "cli++/feature.h"
#include "cli++/module.h"
#include "cli++/version.h"

#endif /* CLIXX_H */
8 changes: 8 additions & 0 deletions src/cli++/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.deps/
.libs/
.dirstamp
*.a
*.o
*.la
*.lo
version.h
15 changes: 15 additions & 0 deletions src/cli++/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
lib_LTLIBRARIES = libcli++.la

libcli___la_SOURCES = \
extern.cc \
feature.cc \
module.cc \
version.cc

base_pkgincludedir = $(includedir)/cli++

base_pkginclude_HEADERS = \
extern.h \
feature.h \
module.h \
version.h
7 changes: 7 additions & 0 deletions src/cli++/extern.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* This is free and unencumbered software released into the public domain. */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "extern.h"
14 changes: 14 additions & 0 deletions src/cli++/extern.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* This is free and unencumbered software released into the public domain. */

#ifndef CLIXX_EXTERN_H
#define CLIXX_EXTERN_H

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* CLIXX_EXTERN_H */
18 changes: 18 additions & 0 deletions src/cli++/feature.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* This is free and unencumbered software released into the public domain. */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "feature.h"

static const char* const feature_names[] = {
"ascii",
#ifndef NDEBUG
"debug",
#endif
#ifndef DISABLE_UNICODE
"unicode",
#endif
nullptr
};
8 changes: 8 additions & 0 deletions src/cli++/feature.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* This is free and unencumbered software released into the public domain. */

#ifndef CLIXX_FEATURE_H
#define CLIXX_FEATURE_H

namespace cli {}

#endif /* CLIXX_FEATURE_H */
11 changes: 11 additions & 0 deletions src/cli++/module.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* This is free and unencumbered software released into the public domain. */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "module.h"

static const char* const module_names[] = {
nullptr
};
8 changes: 8 additions & 0 deletions src/cli++/module.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* This is free and unencumbered software released into the public domain. */

#ifndef CLIXX_MODULE_H
#define CLIXX_MODULE_H

namespace cli {}

#endif /* CLIXX_MODULE_H */
7 changes: 7 additions & 0 deletions src/cli++/version.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* This is free and unencumbered software released into the public domain. */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "version.h"
Loading

0 comments on commit 94c86a5

Please sign in to comment.