This repository has been archived by the owner on Jan 16, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Much nicer handling of compile-time features
- *_SUPPORT enabled in config.h - XLIBS helper app prints lib flags needed for current settings
- Loading branch information
Bert
committed
Sep 12, 2011
1 parent
32a6520
commit dad06c7
Showing
8 changed files
with
73 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
XLIBS | ||
config.h | ||
*.o | ||
sxiv | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#define _POSIX_C_SOURCE 200112L | ||
#define _FEATURE_CONFIG | ||
|
||
#include <stdio.h> | ||
|
||
#include "config.h" | ||
|
||
int n = 0; | ||
|
||
inline void put_lib_flag(const char *flag, int needed) { | ||
if (needed) | ||
printf("%s%s", n++ ? " " : "", flag); | ||
} | ||
|
||
int main(int argc, char **argv) { | ||
put_lib_flag("-lexif", EXIF_SUPPORT); | ||
put_lib_flag("-lgif", GIF_SUPPORT); | ||
|
||
if (n) | ||
printf("\n"); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters