eternaltyro / cryptsetup

Since Google code is shuttering...
http://code.google.com/p/cryptsetup
GNU General Public License v2.0
0 stars 0 forks source link

[PATCH] Update and cleanup build system #159

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
  - config.h must always be the first file to be included directly
    on C files and not indirectly from "internal.h" , otherwise
    you will not get the needed prototypes.
    You probably have saw this issue as makefile.am's or source files
    needed to define GNU_SOURCE and large file macros explicitly
    even though you have AC_USE_SYSTEM_EXTENSIONS and AC_SYS_LARGEFILE
    in configure.ac

    - Use AM_CFLAGS and AM_LDFLAGS consistently and properly.

Original issue reported on code.google.com by judas.iscariote on 3 Jun 2013 at 8:40

Attachments:

GoogleCodeExporter commented 9 years ago
The internal.h must be the first include file and config.h is the first 
included there, that how it was meant (but not used as you just found).
I definitely do not want ugly +#ifdef HAVE_CONFIG_H in every file ;-)
Better include it unconditionally.

The rest defines is relict of old source, I think most of it is not needed 
already but there were some strange configuration where it need to be retested 
first.

Original comment by gmazyl...@gmail.com on 3 Jun 2013 at 9:47

GoogleCodeExporter commented 9 years ago
OK, here is a different version that relies on the preprocessor to ensure 
config.h is included first.. supported by all linux compilers that claim to be 
GCC compatible.

Original comment by judas.iscariote on 22 Jun 2013 at 2:41

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, with some changes committed as
http://code.google.com/p/cryptsetup/source/detail?r=1349efa34db577947083daee2e52
1770614fcfe0#

- include do not need exact path (util-linux is using similar approach)
- build without large file is unsupported

Original comment by gmazyl...@gmail.com on 23 Jun 2013 at 3:22