Skip to content

Commit

Permalink
Added better detection of FreeBSD for issue #124.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahlstromcj committed Dec 19, 2023
1 parent 60daea2 commit 8da1af2
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 60 deletions.
14 changes: 13 additions & 1 deletion INSTALL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
INSTALL for Seq66 v. 0.99.12 and above
Chris Ahlstrom
2015-09-10 to 2023-12-15
2015-09-10 to 2023-12-18

Getting Seq66 requires building the code or going to
"sequencer64-packages/seq66" on GitHub to get an installation package. The
Expand Down Expand Up @@ -105,6 +105,18 @@ Clang Compiler:
One might need to make symbolic links to the desired versions of these
compiler, for example clang-16 and clang++-16.

FreeBSD:

Although one user reported that "./configure" worked fine, on a FreeBSD
virtual machine, we first had to install autoconf, automake, pkgconf, and
gmake. Also had to edit the generated libtool script to change
the version from 2.4.7 to 2.4.6 to fool the build. The command needed to
configure was the following, including the command to make the code.

$ ./configure --with-alsa-prefix=/usr/local/lib
--with-alsa-inc-prefix=/usr/local/include
$ sh -c 'gmake >make.log 2>&1'

Qt and Command-Line Merged Build:

Per package-manager request, one can build and install both qseq66 and
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /bin/sh
# From configure.ac Revision: 0.96.
# From configure.ac Revision: 0.99.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for Seq66 0.99.12.
#
Expand Down
8 changes: 5 additions & 3 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-16
dnl \update 2023-12-18
dnl \version $Revision$
dnl \license $XPC_SUITE_GPL_LICENSE$
dnl
Expand All @@ -20,7 +20,7 @@ dnl
dnl ---------------------------------------------------------------------------

AC_PREREQ([2.69])
AC_REVISION($Revision: 0.96$)
AC_REVISION($Revision: 0.99$)
AC_INIT([Seq66],[0.99.12],[ahlstromcj@gmail.com])
AC_CONFIG_AUX_DIR([aux-files])
AC_CONFIG_MACRO_DIR([m4])
Expand Down Expand Up @@ -122,6 +122,8 @@ ac_build_os="'$(uname -srm)'"
dnl Get the value of /etc/issue.net and remove new lines. Note that
dnl the CLIENT_NAME macro is always "seq66" and is used as part of
dnl the installation sub-directories.
dnl
dnl Is there a way to do this for FreeBSD??? For now see seq66_features.cpp.

AC_DEFINE_UNQUOTED(APP_BUILD_OS, ["$ac_build_os"], "OS/kernel where build was done")
AC_DEFINE_UNQUOTED(
Expand Down Expand Up @@ -532,7 +534,7 @@ dnl automatically for us.

AH_TOP(

#define VERSION_DATE_SHORT "2023-12-16"
#define VERSION_DATE_SHORT "2023-12-18"
#define API_VERSION "0.99"
#define VERSION "0.99.12"

Expand Down
10 changes: 6 additions & 4 deletions configure.help
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
`configure' configures Seq66 0.98.10 to adapt to many kinds of systems.
`configure' configures Seq66 0.99.12 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -88,10 +88,11 @@ Optional Features:
--enable-port-refresh Enable JACK port refresh support
--disable-nsm Disable NSM support
--enable-both Enable Qt and command-line builds
--enable-alsatopology Force to use the Alsa topology library
--disable-alsatest Do not try to compile and run a test Alsa program
--disable-rtmidi Disable rtmidi MIDI engine
--disable-qt Disable Qt5 user-interface
--enable-cli Enable rtmidi command-line build
--disable-qt Disable Qt5 user-interface
--enable-portmidi Enable portmidi build)
--enable-coverage=(no/yes) Turn on a test-coverage build (default=no)
--enable-profile=(no/yes/gprof/prof) Turn on profiling builds (default=no, yes=gprof)
Expand All @@ -111,7 +112,8 @@ Optional Packages:
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
--with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)
--with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)
--with-alsa-inc-prefix=PFX
Prefix where include libraries are (optional)
--with-x use the X Window System

Some influential environment variables:
Expand All @@ -124,10 +126,10 @@ Some influential environment variables:
you have headers in a nonstandard directory <include dir>
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CPP C preprocessor
CXXCPP C++ preprocessor
LT_SYS_LIBRARY_PATH
User-defined run-time library search path.
CPP C preprocessor
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
Expand Down
Binary file modified data/midi/colours.midi
Binary file not shown.
2 changes: 1 addition & 1 deletion include/config.h.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* include/config.h.in. Generated from configure.ac by autoheader. */

#define VERSION_DATE_SHORT "2023-12-16"
#define VERSION_DATE_SHORT "2023-12-18"
#define API_VERSION "0.99"
#define VERSION "0.99.12"

Expand Down
36 changes: 23 additions & 13 deletions libseq66/include/seq66_platform_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
* \library seq66 application
* \author Chris Ahlstrom
* \date 2015-07-24
* \updates 2020-07-11
* \updates 2023-12-18
* \license GNU GPLv2 or above
*
* Copyright (C) 2013-2021 Chris Ahlstrom <ahlstromcj@gmail.com>
* Copyright (C) 2013-2023 Chris Ahlstrom <ahlstromcj@gmail.com>
*
* We need a uniform way to specify OS and compiler features without
* littering the code with macros from disparate compilers. Put all
Expand All @@ -51,6 +51,7 @@
* - Platform macros (in the absense of Windows, Linux macros):
* - SEQ66_PLATFORM_WINDOWS
* - SEQ66_PLATFORM_LINUX
* - SEQ66_PLATFORM_FREEBSD
* - SEQ66_PLATFORM_MACOSX
* - SEQ66_PLATFORM_UNIX
* - Architecture size macros:
Expand Down Expand Up @@ -99,16 +100,17 @@
* conformance, many defined it to 1. Ancient news!
*/

#undef SEQ66_MING_OR_WINDOWS
#undef SEQ66_PLATFORM_WINDOWS
#undef SEQ66_PLATFORM_LINUX
#undef SEQ66_PLATFORM_FREEBSD
#undef SEQ66_PLATFORM_MACOSX
#undef SEQ66_PLATFORM_UNIX
#undef SEQ66_PLATFORM_32_BIT
#undef SEQ66_PLATFORM_64_BIT
#undef SEQ66_PLATFORM_DEBUG
#undef SEQ66_PLATFORM_RELEASE
#undef SEQ66_PLATFORM_MSVC
#undef SEQ66_MING_OR_WINDOWS
#undef SEQ66_PLATFORM_GNU
#undef SEQ66_PLATFORM_XSI
#undef SEQ66_PLATFORM_MINGW
Expand Down Expand Up @@ -138,10 +140,18 @@
#endif
#endif

/**
* FreeBSD macros.
*/

#if defined __FreeBSD__
#define SEQ66_PLATFORM_FREEBSD
#define SEQ66_PLATFORM_UNIX
#endif

/**
* Provides a "Linux" macro, in case the environment doesn't provide it.
* This macro is defined if not already defined and XXXXXX is
* encountered.
* This macro is defined if not already defined.
*/

#if defined Linux /* defined by nar-maven-plugin */
Expand All @@ -154,15 +164,7 @@
#endif

#if defined SEQ66_PLATFORM_LINUX

#if ! defined POSIX
#define POSIX /* defined for legacy code purposes */
#endif

#define SEQ66_PLATFORM_UNIX
#define SEQ66_PLATFORM_POSIX_API
#define SEQ66_PLATFORM_PTHREADS

#endif /* SEQ66_PLATFORM_LINUX */

/**
Expand All @@ -184,6 +186,14 @@
#define SEQ66_PLATFORM_UNIX
#endif

#if defined SEQ66_PLATFORM_UNIX
#define SEQ66_PLATFORM_POSIX_API
#define SEQ66_PLATFORM_PTHREADS
#if ! defined POSIX
#define POSIX /* defined for legacy code purposes */
#endif
#endif

/**
* Provides macros that mean 32-bit, and only 32-bit Windows. For
* example, in Windows, _WIN32 is defined for both 32- and 64-bit
Expand Down
70 changes: 40 additions & 30 deletions libseq66/src/play/performer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* \library seq66 application
* \author Chris Ahlstrom and others
* \date 2018-11-12
* \updates 2023-12-10
* \updates 2023-12-18
* \license GNU GPLv2 or above
*
* Also read the comments in the Seq64 version of this module, perform.
Expand Down Expand Up @@ -6686,9 +6686,9 @@ performer::set_keep_queue (bool activate)
{
automation::action a = activate ?
automation::action::on : automation::action::off;

// (void) set_ctrl_status(a, automation::ctrlstatus::keep_queue);

#if defined SEQ66_PLATFORM_DEBUG
printf("set_keep_queue(%s)\n", activate ? "on" : "off");
#endif
(void) set_ctrl_status(a, automation::ctrlstatus::queue);
}

Expand Down Expand Up @@ -7086,9 +7086,7 @@ performer::sequence_playing_toggle (seq::number seqno)
}

/**
* Needs some work! Using the grid-mode for solo, a weird bug. Works when
* paused here in the debugger, but not in real time.
*
* Needs some work! Using the grid-mode for solo.
* This mode can only be turned off by selecting another grid-mode.
*/

Expand All @@ -7102,30 +7100,28 @@ performer::replace_for_solo (seq::number seqno, bool queued)
automation::ctrlstatus cs = automation::ctrlstatus::replace;
if (queued)
{
cs = automation::ctrlstatus::queue | automation::ctrlstatus::replace;
cs = automation::ctrlstatus::queue |
automation::ctrlstatus::replace;
}

if (seqno == m_solo_seqno) /* user toggle of slot */
{
if (seqno == m_solo_seqno) /* user toggle of slot */
{
(void) set_ctrl_status /* restores snapshot */
(
automation::action::off, cs
);
m_solo_seqno = seq::unassigned(); /* clear_snapshot() */
}
else
{
(void) set_ctrl_status /* saves snapshot */
(
automation::action::on, cs
);
if (s->muted())
s->toggle_playing(get_tick(), resume_note_ons());
(void) set_ctrl_status /* restores snapshot */
(
automation::action::off, cs
);
m_solo_seqno = seq::unassigned(); /* clear_snapshot() */
}
else
{
(void) set_ctrl_status /* saves snapshot */
(
automation::action::on, cs
);
if (s->muted())
s->toggle_playing(get_tick(), resume_note_ons());

off_sequences(seqno); /* off all but seqno */
m_solo_seqno = seqno;
}
off_sequences(seqno); /* off all but seqno */
m_solo_seqno = seqno;
}
notify_trigger_change(seq::all(), change::no);
announce_sequence(s, set_mapper().seq_to_offset(*s));
Expand Down Expand Up @@ -8023,9 +8019,9 @@ performer::loop_control
else if (gm == gridmode::remove)
result = remove_sequence(seqno);
else if (gm == gridmode::thru)
result = set_thru(seqno, false, true); /* true = toggle */
result = set_thru(seqno, false, true); /* true=toggle */
else if (gm == gridmode::solo)
result = replace_for_solo(seqno);
result = replace_for_solo(seqno, true); /* 2023-12-17 */
else if (gm == gridmode::cut)
result = cut_sequence(seqno);
else if (gm == gridmode::double_length)
Expand Down Expand Up @@ -10080,11 +10076,25 @@ performer::set_grid_mode (gridmode gm)
{
if (gm < gridmode::max)
{
#if defined SOLO_KEEP_QUEUE
gridmode oldmode = usr().grid_mode();
#endif
usr().grid_mode(gm);
if (gm != gridmode::record)
{
usr().record_mode(alteration::none);
usr().grid_record_style(recordstyle::merge);
#if defined SOLO_KEEP_QUEUE
if (gm == gridmode::solo) /* ca 2023-12-18 */
{
set_keep_queue(true);
}
else if (oldmode == gridmode::solo)
{
set_keep_queue(false);
}
#else
#endif
}
notify_automation_change(automation::slot::grid_loop);
}
Expand Down
13 changes: 9 additions & 4 deletions libseq66/src/seq66_features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* \library seq66 application
* \author Chris Ahlstrom
* \date 2017-03-12
* \updates 2023-12-06
* \updates 2023-12-18
* \license GNU GPLv2 or above
*
* The first part of this file defines a couple of global structure
Expand Down Expand Up @@ -59,19 +59,24 @@ namespace seq66
*/

#if defined SEQ66_PLATFORM_WINDOWS
static std::string s_app_build_os = "Windows 10"; /* FIXME */
static std::string s_app_build_os = "Windows 10"; /* FIXME */
static std::string s_app_build_issue = "Microsoft Windows";
#endif

#if defined SEQ66_PLATFORM_MACOSX
static std::string s_app_build_os = "MacOSX"; /* FIXME */
static std::string s_app_build_os = "MacOSX"; /* FIXME */
static std::string s_app_build_issue = "Apple MacOSX";
#endif

#if defined SEQ66_PLATFORM_UNIX
#if defined SEQ66_PLATFORM_UNIX /* Linux? */
static std::string s_app_build_os = SEQ66_APP_BUILD_OS;
#if defined SEQ66_PLATFORM_FREEBSD
static std::string s_app_build_issue = "FreeBSD"; /* FIXME */
#else
static std::string s_app_build_issue = SEQ66_APP_BUILD_ISSUE;
#endif
#endif


static std::string s_pane_focus;
static std::string s_alsa_version;
Expand Down
6 changes: 3 additions & 3 deletions seq_qt5/src/qslivegrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ qslivegrid::set_grid_mode ()
* Populate the combo box from grid_loop, grid_record, and, as implemented
* more automation::slot::grid_xxxxx values up to grid_double.
*
* ca 2023-09-30
* Added a new grid mode, grid_mutes, which is in proper order in the gridmode
* enumeration, but implemented by an automation slot replacing reserved_46.
* Added a new grid mode, grid_mutes, which is in proper order in the
* gridmode enumeration, but implemented by an automation slot replacing
* reserved_46.
*/

void
Expand Down

0 comments on commit 8da1af2

Please sign in to comment.