2011-09-13 08:08:35 +00:00
|
|
|
#define _POSIX_C_SOURCE 200112L
|
|
|
|
#define _FEATURE_CONFIG
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#define QUOTE(m) #m
|
|
|
|
#define PUT_MACRO(m) \
|
2011-09-22 22:18:51 +00:00
|
|
|
printf(" -D%s=%s", #m, QUOTE(m))
|
2011-09-13 08:08:35 +00:00
|
|
|
|
2011-09-22 22:18:51 +00:00
|
|
|
inline int puts_if(const char *s, int c) {
|
|
|
|
return c ? printf(" %s", s) : 0;
|
2011-09-13 08:08:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
2011-09-22 22:18:51 +00:00
|
|
|
int i, n = 0;
|
2011-09-13 08:08:35 +00:00
|
|
|
|
|
|
|
for (i = 1; i < argc; i++) {
|
2011-09-22 22:18:51 +00:00
|
|
|
switch (argv[i][0] != '-' || argv[i][2] ? -1 : argv[i][1]) {
|
|
|
|
case 'D':
|
|
|
|
n += PUT_MACRO(EXIF_SUPPORT);
|
|
|
|
n += PUT_MACRO(GIF_SUPPORT);
|
|
|
|
break;
|
|
|
|
case 'l':
|
|
|
|
n += puts_if("-lexif", EXIF_SUPPORT);
|
|
|
|
n += puts_if("-lgif", GIF_SUPPORT);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
fprintf(stderr, "%s: invalid argument: %s\n", argv[0], argv[i]);
|
|
|
|
return 1;
|
2011-09-13 08:08:35 +00:00
|
|
|
}
|
|
|
|
}
|
2011-09-22 22:18:51 +00:00
|
|
|
if (n)
|
|
|
|
printf("\n");
|
2011-09-13 08:08:35 +00:00
|
|
|
return 0;
|
|
|
|
}
|