Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: a few fixes to configure script #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ check_PROGRAMS = test_console test_output test_vt
noinst_LTLIBRARIES = libkmscon-core.la

AM_CFLAGS = \
-Wall \
-Wall
AM_CPPFLAGS = \
-I $(srcdir)/src
AM_LDFLAGS = \
-Wl,--as-needed

if DEBUG
AM_CFLAGS += -g
AM_CFLAGS += -O0 -g
endif

libkmscon_core_la_SOURCES = \
Expand All @@ -23,14 +24,16 @@ libkmscon_core_la_SOURCES = \
src/eloop.c src/eloop.h \
src/vt.c src/vt.h

libkmscon_core_la_CFLAGS = \
$(AM_CFLAGS) \
libkmscon_core_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(DRM_CFLAGS) \
$(EGL_CFLAGS) \
$(GBM_CFLAGS) \
$(OPENGL_CFLAGS) \
$(CAIRO_CFLAGS) \
$(PANGO_CFLAGS)
libkmscon_core_la_LIBADD = \
$(DRM_LIBS) \
$(EGL_LIBS) \
$(GBM_LIBS) \
$(OPENGL_LIBS) \
Expand All @@ -39,24 +42,25 @@ libkmscon_core_la_LIBADD = \

kmscon_SOURCES = src/main.c
kmscon_LDADD = libkmscon-core.la
kmscon_CFLAGS = \
$(AM_CFLAGS) \
$(CAIRO_CFLAGS)

test_console_SOURCES = tests/test_console.c
test_console_LDADD = libkmscon-core.la \
test_console_LDADD = \
libkmscon-core.la \
$(OPENGL_LIBS)
test_console_CFLAGS = $(kmscon_CFLAGS) \
$(OPENGL_CFLAGS)
test_console_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(OPENGL_CFLAGS) \
$(CAIRO_CFLAGS)

test_output_SOURCES = tests/test_output.c
test_output_LDADD = libkmscon-core.la \
test_output_LDADD = \
libkmscon-core.la \
$(OPENGL_LIBS)
test_output_CPPFLAGS = $(kmscon_CFLAGS) \
test_output_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(OPENGL_CFLAGS)

test_vt_SOURCES = tests/test_vt.c
test_vt_LDADD = libkmscon-core.la
test_vt_CPPFLAGS = $(kmscon_CFLAGS)

dist_doc_DATA = README TODO
13 changes: 11 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,21 @@ AC_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects dist-bzip2 no-dist-gzip tar-pax -Wall -Werror])
AM_SILENT_RULES([yes])

LT_PREREQ(2.2)
LT_INIT
# Don't add a default "-g -O2" if CFLAGS wasn't specified
: ${CFLAGS=""}

AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
AC_PROG_CC_C99
AM_PROG_CC_C_O

LT_PREREQ(2.2)
LT_INIT

PKG_CHECK_MODULES([DRM], [libdrm])
AC_SUBST(DRM_CFLAGS)
AC_SUBST(DRM_LIBS)

PKG_CHECK_MODULES([EGL], [egl])
AC_SUBST(EGL_CFLAGS)
AC_SUBST(EGL_LIBS)
Expand Down