From 84cade360095c79a8fbede3313d7054d9f29a192 Mon Sep 17 00:00:00 2001 From: Andrew Wansink Date: Wed, 28 Jan 2015 14:58:07 +1100 Subject: [PATCH] Remove autoconf remnants --- .gitignore | 19 ++++++++-------- Makefile.in | 55 -------------------------------------------- config.h | 6 +++++ configure.ac | 64 ---------------------------------------------------- 4 files changed, 16 insertions(+), 128 deletions(-) delete mode 100644 Makefile.in delete mode 100644 configure.ac diff --git a/.gitignore b/.gitignore index d1bbc8d..eb8292f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,4 @@ Makefile -aclocal.m4 -autom4te.cache -config.h -config.log -config.status -configure libtoml.dylib libtoml.so main @@ -14,6 +8,13 @@ test.o toml.o toml_parse.c toml_parse.o -toml_parse.dot -toml_parse.png -toml_parse.c +.ninja_deps +.ninja_log +CMakeCache.txt +CMakeFiles +CMakeScripts +libtoml.build +libtoml.xcodeproj +build.ninja +cmake_install.cmake +rules.ninja diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index ef27d10..0000000 --- a/Makefile.in +++ /dev/null @@ -1,55 +0,0 @@ -SRCS := toml.c toml_parse.c -OBJS := $(SRCS:.c=.o) - -CC := @CC@ -CFLAGS := @CFLAGS@ -Wall -O0 -I. -LDFLAGS := @LDFLAGS@ - -LIBNAME := toml - -ARCH := $(shell uname -m) -ifeq ($(ARCH),x86_64) - CFLAGS += -m64 -endif - -PLATFORM := $(shell uname -s) -ifeq ($(PLATFORM),Darwin) - LIBEXT=dylib - LIBFLAGS := -dynamic -dylib -lSystem -arch $(ARCH) -else - CFLAGS += -fPIC - LIBEXT=so - LIBFLAGS := -Bdynamic -shared -endif - -all: shared main - -shared: lib$(LIBNAME).$(LIBEXT) - -lib$(LIBNAME).$(LIBEXT): $(OBJS) - $(LD) $(LIBFLAGS) $^ -o $@ $(LDFLAGS) -licuuc - -main: main.o shared - $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -l$(LIBNAME) - ln -f -s $@ parser_test - -test: test.o shared - $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -l$(LIBNAME) -lcunit -lncurses - -%.c: %.rl - ragel $< - -%.dot: %.rl - ragel -V $< > $@ - -%.png: %.dot - dot -Tpng -o$@ $< - -clean: - rm -f $(OBJS) main.o test.o - rm -f lib$(LIBNAME).$(LIBEXT) - rm -f toml_parse.dot - rm -f toml_parse.png - rm -f toml_parse.c - -.PRECIOUS: toml_parse.c diff --git a/config.h b/config.h index e69de29..ef8869b 100644 --- a/config.h +++ b/config.h @@ -0,0 +1,6 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#define HAVE_TYPEOF 1 + +#endif /* CONFIG_H */ diff --git a/configure.ac b/configure.ac deleted file mode 100644 index edc6d47..0000000 --- a/configure.ac +++ /dev/null @@ -1,64 +0,0 @@ -AC_INIT([toml], [1.0]) - -AC_LANG_C -AC_LANG_WERROR -AC_PROG_CC([clang cc gcc]) - -AC_CHECK_PROG([RAGEL], [ragel], [yes]) -if test "x$RAGEL" != "xyes" -then - AC_MSG_ERROR([ragel required to build libtoml]) -fi - -LDFLAGS="$LDFLAGS -L." - -AC_ARG_WITH(cunit, - AS_HELP_STRING([--with-cunit=], [cunit path for tests]), - [ - case "$withval" in - "yes") - AC_CHECK_LIB([cunit], [CU_get_error],, - AC_MSG_ERROR([cunit not found])) - ;; - *) - savedCFLAGS=$CFLAGS - savedLDFLAGS=$LDFLAGS - CFLAGS="$CFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - AC_CHECK_LIB([cunit], [CU_get_error], [ - AC_CHECK_HEADER([CUnit/CUnit.h], [ - savedCFLAGS=$CFLAGS - savedLDFLAGS="$LDFLAGS" - ]) - ]) - CFLAGS=$savedCFLAGS - LDFLAGS=$savedLDFLAGS - ;; - esac - ] -) - -AC_ARG_WITH(icu, - AS_HELP_STRING([--with-icu=], [path to icu installation]), - [ - case "$withval" in - "yes") - ;; - *) - savedCFLAGS=$CFLAGS - savedLDFLAGS=$LDFLAGS - CFLAGS="$CFLAGS -I$withval/include" - LDFLAGS="$LDFLAGS -L$withval/lib" - AC_CHECK_HEADER([unicode/ustring.h], [ - savedCFLAGS=$CFLAGS - savedLDFLAGS="$LDFLAGS" - ]) - CFLAGS=$savedCFLAGS - LDFLAGS=$savedLDFLAGS - ;; - esac - ] -) - -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT