wmail: use AC_CONFIG_HEADERS to generate config.h.
This commit is contained in:
parent
356b07a201
commit
d5312c3133
3
wmail/.gitignore
vendored
3
wmail/.gitignore
vendored
|
@ -1,5 +1,8 @@
|
||||||
Makefile
|
Makefile
|
||||||
autom4te.cache/
|
autom4te.cache/
|
||||||
|
config.h
|
||||||
|
config.h.in
|
||||||
|
config.h.in~
|
||||||
config.log
|
config.log
|
||||||
config.status
|
config.status
|
||||||
configure
|
configure
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
AC_INIT(src/wmail.c)
|
AC_INIT(src/wmail.c)
|
||||||
|
AC_CONFIG_HEADERS(config.h)
|
||||||
|
|
||||||
dnl Checks for programs.
|
dnl Checks for programs.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
|
|
@ -6,20 +6,20 @@
|
||||||
LIBS = @LIBS@ @XLFLAGS@ @XLIBS@
|
LIBS = @LIBS@ @XLFLAGS@ @XLIBS@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
CFLAGS = @CFLAGS@ @XCFLAGS@
|
CFLAGS = @CFLAGS@ @XCFLAGS@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @DEFS@ @CPPFLAGS@
|
||||||
|
|
||||||
default all target: wmail
|
default all target: wmail
|
||||||
|
|
||||||
wmail: wmail.o common.o config.o
|
wmail: wmail.o common.o config.o
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LIBS)
|
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LIBS)
|
||||||
|
|
||||||
wmail.o: wmail.c common.h config.h xpm/main.xpm xpm/symbols.xpm xpm/numbers.xpm xpm/button.xpm xpm/chars.xpm
|
wmail.o: wmail.c common.h config.h ../config.h xpm/main.xpm xpm/symbols.xpm xpm/numbers.xpm xpm/button.xpm xpm/chars.xpm
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
common.o: common.c common.h
|
common.o: common.c common.h ../config.h
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
config.o: config.c config.h common.h
|
config.o: config.c config.h common.h ../config.h
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -28,12 +28,19 @@
|
||||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#ifndef CONFIG_H_INCLUDED
|
||||||
|
#include "../config.h"
|
||||||
|
#define CONFIG_H_INCLUDED
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#if defined(DEBUG) || defined(DEBUG2) || defined(_DEBUG)
|
#if defined(DEBUG) || defined(DEBUG2) || defined(_DEBUG)
|
||||||
void TRACE( const char *fmt, ... )
|
void TRACE( const char *fmt, ... )
|
||||||
|
|
|
@ -28,10 +28,18 @@
|
||||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#ifndef CONFIG_H_INCLUDED
|
||||||
|
#include "../config.h"
|
||||||
|
#define CONFIG_H_INCLUDED
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,13 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// includes
|
// includes
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#ifndef CONFIG_H_INCLUDED
|
||||||
|
#include "../config.h"
|
||||||
|
#define CONFIG_H_INCLUDED
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -47,6 +54,7 @@
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <libdockapp/dockapp.h>
|
#include <libdockapp/dockapp.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue