Skip to content

Commit

Permalink
Updated configure.ac to handle linker differences between gcc/g++ and…
Browse files Browse the repository at this point in the history
… clang/clang++ for issue #124.
  • Loading branch information
ahlstromcj committed Dec 15, 2023
1 parent 3ba3096 commit 361621c
Show file tree
Hide file tree
Showing 34 changed files with 168 additions and 200 deletions.
8 changes: 3 additions & 5 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alsa.m4 \
$(top_srcdir)/m4/ax_have_qt_min.m4 \
$(top_srcdir)/m4/ax_prefix_config_h.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/xpc_debug.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/xpc_debug.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
Expand Down Expand Up @@ -312,6 +309,7 @@ LIBTOOL = @LIBTOOL@
# $(top_srcdir)/config.status --recheck
#-----------------------------------------------------------------------------
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LINKER_FLAGS = @LINKER_FLAGS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
Expand Down
8 changes: 3 additions & 5 deletions Seq66cli/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alsa.m4 \
$(top_srcdir)/m4/ax_have_qt_min.m4 \
$(top_srcdir)/m4/ax_prefix_config_h.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/xpc_debug.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/xpc_debug.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
Expand Down Expand Up @@ -271,6 +268,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LINKER_FLAGS = @LINKER_FLAGS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
Expand Down
8 changes: 5 additions & 3 deletions Seq66qt5/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \library seq66qt5 application
# \author Chris Ahlstrom
# \date 2017-09-05
# \update 2023-12-13
# \update 2023-12-15
# \version $Revision$
# \license $XPC_SUITE_GPL_LICENSE$
#
Expand Down Expand Up @@ -43,6 +43,8 @@ CLEANFILES = *.gc*
PACKAGE = @PACKAGE@
VERSION = @VERSION@

# LINKER_FLAGS = @ LINKER_FLAGS @

#******************************************************************************
# Install directories
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -206,12 +208,12 @@ bin_PROGRAMS = $(MIDIAPP)

qseq66_SOURCES = seq66qt5.cpp
qseq66_DEPENDENCIES = $(NSM_DEPS) $(dependencies)
qseq66_LDFLAGS = $(LINKER_FLAGS_ADD)
qseq66_LDFLAGS = $(LINKER_FLAGS)
qseq66_LDADD = $(NSM_LIBS) $(libraries) $(LIBLO_LIBS) $(QT_LIBS) $(ALSA_LIBS) $(JACK_LIBS) $(AM_LDFLAGS)

qpseq66_SOURCES = seq66qt5.cpp
qpseq66_DEPENDENCIES = $(NSM_DEPS) $(dependencies)
qpseq66_LDFLAGS = $(LINKER_FLAGS_ADD)
qpseq66_LDFLAGS = $(LINKER_FLAGS)
qpseq66_LDADD = $(NSM_LIBS) $(libraries) $(LIBLO_LIBS) $(QT_LIBS) $(ALSA_LIBS) $(JACK_LIBS) $(AM_LDFLAGS)

#******************************************************************************
Expand Down
16 changes: 8 additions & 8 deletions Seq66qt5/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# \library seq66qt5 application
# \author Chris Ahlstrom
# \date 2017-09-05
# \update 2023-12-13
# \update 2023-12-15
# \version $Revision$
# \license $XPC_SUITE_GPL_LICENSE$
#
Expand Down Expand Up @@ -116,11 +116,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alsa.m4 \
$(top_srcdir)/m4/ax_have_qt_min.m4 \
$(top_srcdir)/m4/ax_prefix_config_h.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/xpc_debug.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/xpc_debug.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
Expand Down Expand Up @@ -273,6 +270,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LINKER_FLAGS = @LINKER_FLAGS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
Expand Down Expand Up @@ -402,6 +400,8 @@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@

# LINKER_FLAGS = @ LINKER_FLAGS @

#******************************************************************************
# Install directories
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -555,11 +555,11 @@ dependencies = \
#----------------------------------------------------------------------------
qseq66_SOURCES = seq66qt5.cpp
qseq66_DEPENDENCIES = $(NSM_DEPS) $(dependencies)
qseq66_LDFLAGS = $(LINKER_FLAGS_ADD)
qseq66_LDFLAGS = $(LINKER_FLAGS)
qseq66_LDADD = $(NSM_LIBS) $(libraries) $(LIBLO_LIBS) $(QT_LIBS) $(ALSA_LIBS) $(JACK_LIBS) $(AM_LDFLAGS)
qpseq66_SOURCES = seq66qt5.cpp
qpseq66_DEPENDENCIES = $(NSM_DEPS) $(dependencies)
qpseq66_LDFLAGS = $(LINKER_FLAGS_ADD)
qpseq66_LDFLAGS = $(LINKER_FLAGS)
qpseq66_LDADD = $(NSM_LIBS) $(libraries) $(LIBLO_LIBS) $(QT_LIBS) $(ALSA_LIBS) $(JACK_LIBS) $(AM_LDFLAGS)
all: all-am

Expand Down
3 changes: 2 additions & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TO DO for Seq66 0.99.12
Chris Ahlstrom
2019-04-13 to 2023-12-12
2019-04-13 to 2023-12-15

Misc:

Expand Down Expand Up @@ -30,6 +30,7 @@ Misc:
a macro).
- Improve the output of text events in the slot_dump() function.
- Test F7 SysEx continuation messages.
- Dixie04.mid has proven to be quite intractable.
- The Carpet song has PPQN = 120 and displays weirdly in pattern editor.
Too difficult to fix at this time; converted it to 192.

Expand Down
18 changes: 7 additions & 11 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,7 @@ SEQ66_API_PATCH
SEQ66_API_MINOR
SEQ66_API_MAJOR
SEQ66_SUITE_NAME
LINKER_FLAGS
CXXCPP
CPP
am__fastdepCXX_FALSE
Expand Down Expand Up @@ -4705,7 +4706,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu



LINKER_FLAGS_ADD = "-Wl,--copy-dt-needed-entries"
linker_flag="-Wl,--copy-dt-needed-entries"

if test "$CXX" = "clang++" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether clang works" >&5
Expand Down Expand Up @@ -4742,13 +4743,13 @@ $as_echo "yes" >&6; }

$as_echo "#define CLANG_SUPPORT 1" >>confdefs.h

LINKER_FLAGS_ADD = ""
linker_flag=""

else

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "Selected compiler could not find/parse C++ standard headers. Rerun with CC=c-compiler CXX=c++-compiler ./configure ..." "$LINENO" 5
as_fn_error $? "Compiler could not find/parse C++ headers. Use CC=c-compiler CXX=c++-compiler ./configure ..." "$LINENO" 5

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Expand All @@ -4760,6 +4761,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu

fi

LINKER_FLAGS=$linker_flag




Expand Down Expand Up @@ -8936,10 +8939,6 @@ _lt_linker_boilerplate=`cat conftest.err`
$RM -r conftest*


## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
## the running order or otherwise move them around unless you know exactly
## what you are doing...
if test -n "$compiler"; then

lt_prog_compiler_no_builtin_flag=
Expand Down Expand Up @@ -16101,7 +16100,7 @@ seq66pixdir="${datadir}/pixmaps/seq66-${SEQ66_API_VERSION}"


CFLAGS="${CFLAGS}"
ac_cflags="${CFLAGS}"




Expand Down Expand Up @@ -16831,9 +16830,6 @@ $as_echo "#define NSM_SUPPORT 1" >>confdefs.h
NSM_CFLAGS="-I ../libsessions/include"
NSM_LIBS="-llo -L../libsessions/src/.libs/ -lsessions"
NSM_DEPS="../libsessions/src/.libs/libsessions.la"

$as_echo "#define NSM_SUPPORT 1" >>confdefs.h

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sessions/NSM support enabled" >&5
$as_echo "Sessions/NSM support enabled" >&6; };
fi
Expand Down
23 changes: 11 additions & 12 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dnl \file configure.ac
dnl \library Seq66
dnl \author Chris Ahlstrom
dnl \date 2018-11-09
dnl \update 2023-12-13
dnl \update 2023-12-15
dnl \version $Revision$
dnl \license $XPC_SUITE_GPL_LICENSE$
dnl
Expand Down Expand Up @@ -46,7 +46,6 @@ AC_PROG_CXX(g++ clang++ llvm-g++)
AC_PROG_CPP()
AC_PROG_CXXCPP()

dnl NEW NEW NEW
dnl Important: see
dnl
dnl https://android.googlesource.com/toolchain/llvm/+/release_34/
Expand All @@ -58,7 +57,7 @@ dnl There's a broken regex in aclocal that otherwise will think that we call
dnl m4's include builtin. The linker flags are used with gcc, but not
dnl clang.

LINKER_FLAGS_ADD = "-Wl,--copy-dt-needed-entries"
linker_flag="-Wl,--copy-dt-needed-entries"

if test "$CXX" = "clang++" ; then
AC_MSG_CHECKING([whether clang works])
Expand All @@ -73,18 +72,18 @@ if test "$CXX" = "clang++" ; then
]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE(CLANG_SUPPORT, 1, [Define if CLANG is active])
LINKER_FLAGS_ADD = ""
AC_DEFINE(CLANG_SUPPORT, 1, [Define if clang is active])
linker_flag=""
],
[
AC_MSG_RESULT([no])
AC_MSG_ERROR([Selected compiler could not find/parse C++ standard headers. Rerun with CC=c-compiler CXX=c++-compiler ./configure ...])
AC_MSG_ERROR([Compiler could not find/parse C++ headers. Use CC=c-compiler CXX=c++-compiler ./configure ...])
])
AC_LANG_POP([C++])
fi
dnl NEW NEW NEW

dnl AC_PROG_CXXCPP()
LINKER_FLAGS=$linker_flag
AC_SUBST([LINKER_FLAGS])

dnl 5.c. Mingw support. Missing, qmake support is more reliable at
dnl present.
Expand Down Expand Up @@ -112,7 +111,7 @@ dnl name of the client application for display, and the version.

PACKAGE="seq66"
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_SUBST(PACKAGE)
AC_SUBST([PACKAGE])

AC_DEFINE(APP_TYPE, ["qt5"], "Type of the Seq66 executable, qt/cli")
AC_DEFINE(APP_ENGINE, ["rtmidi"], "Seq66 MIDI engine, rtmidi/portmidi")
Expand Down Expand Up @@ -221,7 +220,8 @@ AC_SUBST(seq66pixdir)
dnl 4. Get external flags, if any.

CFLAGS="${CFLAGS}"
ac_cflags="${CFLAGS}"

dnl ac_cflags="${CFLAGS}"

dnl Check for header files. Added more to support daemonization.

Expand Down Expand Up @@ -392,7 +392,6 @@ if test "$ac_nsm" != "no"; then
NSM_CFLAGS="-I ../libsessions/include"
NSM_LIBS="-llo -L../libsessions/src/.libs/ -lsessions"
NSM_DEPS="../libsessions/src/.libs/libsessions.la"
AC_DEFINE(NSM_SUPPORT, 1, [Define to enable NSM])
AC_MSG_RESULT([Sessions/NSM support enabled]);
fi

Expand Down Expand Up @@ -529,7 +528,7 @@ dnl automatically for us.

AH_TOP(

#define VERSION_DATE_SHORT "2023-12-13"
#define VERSION_DATE_SHORT "2023-12-15"
#define API_VERSION "0.99"
#define VERSION "0.99.12"

Expand Down
8 changes: 3 additions & 5 deletions data/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alsa.m4 \
$(top_srcdir)/m4/ax_have_qt_min.m4 \
$(top_srcdir)/m4/ax_prefix_config_h.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/xpc_debug.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/xpc_debug.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
Expand Down Expand Up @@ -210,6 +207,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LINKER_FLAGS = @LINKER_FLAGS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
Expand Down
8 changes: 3 additions & 5 deletions doc/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alsa.m4 \
$(top_srcdir)/m4/ax_have_qt_min.m4 \
$(top_srcdir)/m4/ax_prefix_config_h.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/xpc_debug.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/xpc_debug.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
Expand Down Expand Up @@ -268,6 +265,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LINKER_FLAGS = @LINKER_FLAGS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
Expand Down
8 changes: 3 additions & 5 deletions doc/latex/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alsa.m4 \
$(top_srcdir)/m4/ax_have_qt_min.m4 \
$(top_srcdir)/m4/ax_prefix_config_h.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/xpc_debug.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/xpc_debug.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
Expand Down Expand Up @@ -266,6 +263,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LINKER_FLAGS = @LINKER_FLAGS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
Expand Down
8 changes: 3 additions & 5 deletions doc/latex/tex/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/alsa.m4 \
$(top_srcdir)/m4/ax_have_qt_min.m4 \
$(top_srcdir)/m4/ax_prefix_config_h.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/xpc_debug.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/pkg.m4 \
$(top_srcdir)/m4/xpc_debug.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
Expand Down Expand Up @@ -208,6 +205,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LINKER_FLAGS = @LINKER_FLAGS@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
Expand Down
Loading

0 comments on commit 361621c

Please sign in to comment.