From ec1d50f7c39f604a75cd4d3c0694bf81d95ef656 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Fri, 6 Jan 2012 16:52:28 +0100 Subject: [PATCH] support for target --with-contiki in configure This target is to avoid accidential overwriting of hard-coded Makefile and config.h by configure. When called with --with-contiki, the files Makefile.contiki and config.h.contiki are copied to Makefile and config.h, respectively. --- Makefile => Makefile.contiki | 0 config.h => config.h.contiki | 0 configure.in | 11 ++++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) rename Makefile => Makefile.contiki (100%) rename config.h => config.h.contiki (100%) diff --git a/Makefile b/Makefile.contiki similarity index 100% rename from Makefile rename to Makefile.contiki diff --git a/config.h b/config.h.contiki similarity index 100% rename from config.h rename to config.h.contiki diff --git a/configure.in b/configure.in index 0fa23686..25c28be2 100644 --- a/configure.in +++ b/configure.in @@ -7,9 +7,18 @@ # README for terms of use. AC_PREREQ([2.65]) -AC_INIT([libcoap], [0.6.0]) +AC_INIT([libcoap], [1.8.0]) AC_CONFIG_SRCDIR([coap.h]) +# First check for Contiki build to quit configure before any other test +AC_ARG_WITH(contiki, + [AS_HELP_STRING([--with-contiki],[build libcoap for the Contiki OS])], + [cp -p Makefile.contiki Makefile + cp -p config.h.contiki config.h + AC_MSG_NOTICE([Contiki build prepared]) + exit 0], + []) + # Checks for programs. AC_PROG_MAKE_SET AC_PROG_CC