Include config.h only if HAVE_CONFIG_H

This commit is contained in:
Ruben Laguna 2015-03-07 20:41:02 +01:00
parent acd23c6a1d
commit df8982b75b
2 changed files with 13 additions and 2 deletions

View File

@ -1,5 +1,9 @@
#ifndef COMMON_H
#define COMMON_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
void myfunc();
#endif /* COMMON_H */

View File

@ -1,10 +1,17 @@
#include "config.h"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include "common.h"
int main(int argc, char *argv[])
{
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;
}