diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-12-03 19:57:55 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-12-03 22:10:39 -0500 |
commit | 18b302ba98dda7d53b43433e2da8801f72ee7223 (patch) | |
tree | ff504f9259cbacd9f9e6c2d87976ec083e7f9d1f | |
parent | a5859321caff7e3575a8f68454014c99eca09664 (diff) |
Use autoconf instead of the flaky config.mk hack.
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | Makefile.in (renamed from Makefile) | 29 | ||||
-rw-r--r-- | configure.ac | 15 |
3 files changed, 31 insertions, 19 deletions
@@ -2,5 +2,9 @@ *~ libeagle.so test -config.mk eagle.pc +aclocal.m4 +autom4te.cache/ +config.log +config.status +configure @@ -1,6 +1,8 @@ -CFLAGS = -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -g \ - $(PKG_CFLAGS) -LDLIBS = $(PKG_LIBS) -ldl +CFLAGS = -fPIC -g @GCC_CFLAGS@ @EAGLE_CFLAGS@ +LDLIBS = @EAGLE_LIBS@ -ldl + +prefix = @prefix@ +exec_prefix = @exec_prefix@ all : libeagle.so test @@ -18,12 +20,6 @@ test_objs = test.o gears.o test : libeagle.so $(test_objs) gcc -o $@ -L. -leagle -lm $(test_objs) -config.mk : - echo "# autogenerated config.mk" > config.mk - echo PKG_CFLAGS = $(shell pkg-config --cflags libdrm dri x11 xfixes xext) >> config.mk - echo PKG_LIBS = $(shell pkg-config --libs libdrm dri x11 xfixes xext) >> config.mk - echo prefix = $$prefix >> config.mk - import-glapi : cp $(MESA_SRC)/src/mesa/main/glheader.h glapi cp $(MESA_SRC)/src/glx/mini/dispatch.c glapi @@ -37,14 +33,11 @@ import-glapi : cp $(MESA_SRC)/src/mesa/glapi/glapi.c glapi cp $(MESA_SRC)/src/mesa/glapi/glapi_getproc.c glapi -eagle.pc : eagle.pc.in - sed -e "s:@prefix@:$(prefix):" $< > $@ - install : libeagle.so eagle.pc - cp libeagle.so $(prefix)/lib - cp eagle.h $(prefix)/include - cp eagle.pc $(prefix)/lib/pkgconfig -clean : - rm -f *.o glapi/*.o libeagle.so test eagle.pc + install -d @libdir@ @includedir@ @libdir@/pkgconfig + install libeagle.so @libdir@ + install eagle.h @includedir@ + install eagle.pc @libdir@/pkgconfig --include config.mk +clean : + rm -f *.o glapi/*.o libeagle.so test diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..30dc6f4 --- /dev/null +++ b/configure.ac @@ -0,0 +1,15 @@ +AC_INIT(eagle, 0.1) +AC_PROG_CC + +# FIXME: We should make the x11-dri2 backend optional + +PKG_PROG_PKG_CONFIG() +PKG_CHECK_MODULES(EAGLE, [libdrm dri x11 xfixes xext]) + +if test $CC = gcc; then + GCC_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes" +fi +AC_SUBST(GCC_CFLAGS) + +AC_CONFIG_FILES([Makefile eagle.pc]) +AC_OUTPUT
\ No newline at end of file |