Include config.h only if HAVE_CONFIG_H
This commit is contained in:
parent
acd23c6a1d
commit
df8982b75b
|
@ -1,5 +1,9 @@
|
||||||
#ifndef COMMON_H
|
#ifndef COMMON_H
|
||||||
#define COMMON_H
|
#define COMMON_H
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
void myfunc();
|
void myfunc();
|
||||||
|
|
||||||
#endif /* COMMON_H */
|
#endif /* COMMON_H */
|
||||||
|
|
11
src/main.c
11
src/main.c
|
@ -1,10 +1,17 @@
|
||||||
#include "config.h"
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
printf ("Hello world\n");
|
printf ("Hello world\n");
|
||||||
myfunc();
|
printf ("PACKAGE " PACKAGE "\n");
|
||||||
|
printf ("PACKAGE_BUGREPORT " PACKAGE_BUGREPORT "\n");
|
||||||
|
printf ("PACKAGE_NAME "PACKAGE_NAME "\n");
|
||||||
|
printf ("PACKAGE_STRING " PACKAGE_STRING "\n");
|
||||||
|
printf ("PACKAGE_TARNAME " PACKAGE_TARNAME "\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user