Commit 610ff3b76562e9f6e7ca7e21a4fe3b094d205901
1 parent
e93f2d88
unit-test.h is now generated to avoid config.h dependency
Showing
3 changed files
with
8 additions
and
7 deletions
.gitignore
configure.ac
| ... | ... | @@ -16,17 +16,15 @@ m4_define([libmodbus_version_minor], [0]) |
| 16 | 16 | m4_define([libmodbus_version_micro], [1]) |
| 17 | 17 | |
| 18 | 18 | m4_define([libmodbus_release_status], |
| 19 | - [m4_if(m4_eval(libmodbus_version_minor % 2), [1], [snapshot], | |
| 20 | - [release])]) | |
| 19 | + [m4_if(m4_eval(libmodbus_version_minor % 2), [1], [snapshot], [release])]) | |
| 21 | 20 | |
| 22 | 21 | m4_define([libmodbus_version], |
| 23 | - [libmodbus_version_major.libmodbus_version_minor.libmodbus_version_micro]) | |
| 22 | + [libmodbus_version_major.libmodbus_version_minor.libmodbus_version_micro]) | |
| 24 | 23 | |
| 25 | 24 | AC_PREREQ([2.63]) |
| 26 | 25 | AC_INIT([libmodbus],[libmodbus_version], |
| 27 | 26 | [https://github.com/stephane/libmodbus/issues]) |
| 28 | -AC_CONFIG_SRCDIR([src/modbus.c]) | |
| 29 | -AC_CONFIG_HEADERS([config.h]) | |
| 27 | +AC_CONFIG_HEADERS([config.h tests/unit-test.h]) | |
| 30 | 28 | AM_INIT_AUTOMAKE([foreign]) |
| 31 | 29 | # enable nice build output on automake1.11 |
| 32 | 30 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | ... | ... |
tests/unit-test.h renamed to tests/unit-test.h.in
| 1 | 1 | /* |
| 2 | - * Copyright © 2008-2010 Stéphane Raimbault <stephane.raimbault@gmail.com> | |
| 2 | + * Copyright © 2008-2011 Stéphane Raimbault <stephane.raimbault@gmail.com> | |
| 3 | 3 | * |
| 4 | 4 | * This program is free software: you can redistribute it and/or modify |
| 5 | 5 | * it under the terms of the GNU General Public License as published by |
| ... | ... | @@ -18,7 +18,9 @@ |
| 18 | 18 | #ifndef _UNIT_TEST_H_ |
| 19 | 19 | #define _UNIT_TEST_H_ |
| 20 | 20 | |
| 21 | -#include <config.h> | |
| 21 | +/* Constants defined by configure.ac */ | |
| 22 | +#define HAVE_INTTYPES_H @HAVE_INTTYPES_H@ | |
| 23 | +#define HAVE_STDINT_H @HAVE_STDINT_H@ | |
| 22 | 24 | |
| 23 | 25 | #ifdef HAVE_INTTYPES_H |
| 24 | 26 | #include <inttypes.h> | ... | ... |