]> sigrok.org Git - libserialport.git/commitdiff
autotools: Don't set/override "user variables".
authorUwe Hermann <redacted>
Sun, 19 Apr 2015 16:36:58 +0000 (18:36 +0200)
committerUwe Hermann <redacted>
Sun, 19 Apr 2015 17:01:08 +0000 (19:01 +0200)
This fixes bug #577.

Makefile.am
configure.ac

index 58185e99f615d0fda3c385dc3f534473a5e1a661..8c0276c7e5bb4f5fc64798a920000ab3bf49f730 100644 (file)
@@ -22,6 +22,9 @@ ACLOCAL_AMFLAGS = -I autostuff
 
 AM_CPPFLAGS = -I$(top_srcdir)
 
+# Enable more compiler warnings.
+AM_CFLAGS = -std=c99 -Wall -Wextra -pedantic -Wmissing-prototypes -Wshadow
+
 lib_LTLIBRARIES = libserialport.la
 
 libserialport_la_SOURCES = serialport.c libserialport_internal.h
@@ -39,13 +42,15 @@ libserialport_la_SOURCES += freebsd.c
 endif
 
 libserialport_la_LIBADD = $(LIBOBJS)
-
-libserialport_la_LDFLAGS = $(SP_LIB_LDFLAGS) -no-undefined
-
 if WIN32
 libserialport_la_LIBADD += $(SP_LIBS)
 endif
 
+libserialport_la_LDFLAGS = $(SP_LIB_LDFLAGS) -no-undefined
+if MACOSX
+libserialport_la_LDFLAGS += -framework IOKit -framework CoreFoundation
+endif
+
 library_includedir = $(includedir)
 library_include_HEADERS = libserialport.h
 
index 0662eb66d973ce9bbdce3c8e57f4a4251b28030d..e569ee07f2dd296d8b4aa147929e8055f31efe15 100644 (file)
@@ -42,9 +42,6 @@ AM_INIT_AUTOMAKE([1.11 -Wall -Werror check-news])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 
-# Enable more compiler warnings.
-CFLAGS="$CFLAGS -std=c99 -Wall -Wextra -pedantic -Wmissing-prototypes -Wshadow"
-
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_CPP
@@ -89,7 +86,6 @@ case $host_os in
        AM_CONDITIONAL([WIN32], false)
        AM_CONDITIONAL([MACOSX], true)
        AM_CONDITIONAL([FREEBSD], false)
-       LDFLAGS="$LDFLAGS -Wl,-framework -Wl,IOKit -Wl,-framework -Wl,CoreFoundation"
        AC_CHECK_HEADER(IOKit/IOKitLib.h, [], [AC_MSG_ERROR([IOKit/IOKitLib.h not found])])
        ;;
 mingw* | cygwin*)