From: Michael Rasmussen Date: Wed, 25 Dec 2019 14:34:34 +0000 (+0100) Subject: initial X-Git-Url: http://git.datanom.net/vcard-parser.git/commitdiff_plain/b198a81eaad8b5bb4f28c95b3e6e3d66abfaf1ac initial Signed-off-by: Michael Rasmussen --- b198a81eaad8b5bb4f28c95b3e6e3d66abfaf1ac diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fa989b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,75 @@ + +# Created by https://www.gitignore.io/api/c,linux +# Edit at https://www.gitignore.io/?templates=c,linux + +### C ### +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +# End of https://www.gitignore.io/api/c,linux + diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..2cba5ad --- /dev/null +++ b/Makefile.am @@ -0,0 +1,7 @@ +AUTOMAKE_OPTIONS = gnu + +SUBDIRS = src + +ACLOCAL_AMFLAGS = -I m4 + +EXTRA_DIST = README COPYING AUTHORS ChangeLog INSTALL NEWS diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..0c4b0ae --- /dev/null +++ b/autogen.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +autoconf +automake --add-missing +libtoolize +autoreconf -f +./configure --enable-maintainer-mode + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..92465fc --- /dev/null +++ b/configure.ac @@ -0,0 +1,91 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.59) +AC_INIT(llist, 0.1, mir@datanom.net) +AC_CONFIG_SRCDIR(src/main.c) +AM_INIT_AUTOMAKE +AM_MAINTAINER_MODE +AC_CONFIG_HEADER([config.h]) +CFLAGS="-Wall" +AC_CONFIG_MACRO_DIR([m4]) + +# Checks for programs. +AC_PROG_CC +AM_PROG_CC_STDC +AC_LANG_C +AC_ISC_POSIX +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LIBTOOL + +# Find pkg-config +# +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) +if test x$PKG_CONFIG = xno ; then + AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/]) +fi + +PKG_CHECK_MODULES(GLIB, [glib-2.0]) +AC_SUBST(GLIB_CFLAGS) +AC_SUBST(GLIB_LIBS) + +# Checks for header files. +AC_HEADER_STDC + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T + +# Checks for library functions. + +# Optional building instructions +if test $USE_MAINTAINER_MODE = yes; then + CFLAGS="$CFLAGS -g -Werror" + LIBS="$LIBS" + DEBUG="YES" +else + CFLAGS="$CFLAGS -O -O2" + LIBS="$LIBS" + DEBUG="NO" +fi + +AC_ARG_ENABLE(example, + [AC_HELP_STRING([--enable-example],[Build example [default=no]])], + [ac_enable_example=$enableval], + [ac_enable_example=no]) + +AC_MSG_CHECKING([whether to compile the example application]) +if test x"$ac_enable_example" = xyes; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi +AM_CONDITIONAL(BUILD_EXAMPLE, test x"$ac_enable_example" = "xyes") + +AC_CONFIG_COMMANDS( + [summary], + [[echo "" + echo -e "libvcard will be compiled with these settings:" + echo -e "\tCFLAGS:\t\t${CFLAGS}" + echo -e "\tLIBS:\t\t${LIBS}" + echo "" + echo -e "Now run make to build library" + echo "" + echo -e "Please send bugs or feature requests to the maintainer(s)." + echo -e "Email addresses can be found in the AUTHORS file." + echo ""]], + [ + CFLAGS="$CFLAGS" + LIBS="$LIBS" + ] +) + +AC_OUTPUT([ + Makefile + src/Makefile +]) diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..3e9af86 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,23 @@ +AUTOMAKE_OPTIONS = gnu + +AM_CPPFLAGS = \ + @GLIB_CFLAGS@ \ + -I $(top_srcdir) + +lib_LTLIBRARIES = libvcard.la + +libvcard_la_SOURCES = \ + vcard.c + +include_HEADERS = \ + vcard.h + +libvcard_la_LIBADD = \ + @GLIB_LIBS@ + +if BUILD_EXAMPLE +bin_PROGRAMS = vcard-test +vcard_SOURCES = vcard-test.c +vcard_LDADD = libvcard.la +endif + diff --git a/src/vcard-test.c b/src/vcard-test.c new file mode 100644 index 0000000..e69de29 diff --git a/src/vcard.c b/src/vcard.c new file mode 100644 index 0000000..e69de29 diff --git a/src/vcard.h b/src/vcard.h new file mode 100644 index 0000000..e69de29