mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-10 08:33:36 +02:00
Use automake for libwidgetextra.
Replace the custom Makefile by automake. In addition drop the hacky libwidgetextra-uninstalled.pc and configure the library like every other optional library, but check if the library is not disabled.
This commit is contained in:
@@ -15,6 +15,8 @@ FileDialog.a: FileDialog-recursive
|
||||
# libwidgetextra
|
||||
widgetextra:
|
||||
$(MAKE) -C lib-widget-extra
|
||||
libwidgetextra.a: widgetextra
|
||||
ln -sf lib-widget-extra/.libs/libwidgetextra.a libwidgetextra.a
|
||||
|
||||
# libogg
|
||||
libogg-recursive:
|
||||
|
12
lib-src/lib-widget-extra/Makefile.am
Normal file
12
lib-src/lib-widget-extra/Makefile.am
Normal file
@@ -0,0 +1,12 @@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = libwidgetextra.pc.in
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libwidgetextra.pc
|
||||
|
||||
lib_LTLIBRARIES = libwidgetextra.la
|
||||
|
||||
libwidgetextra_la_CPPFLAGS = $(WX_CXXFLAGS)
|
||||
libwidgetextra_la_LIBADD = $(WX_LIBS)
|
||||
libwidgetextra_la_SOURCES = NonGuiThread.cpp NonGuiThread.h
|
@@ -7,21 +7,26 @@ dnl Richard Ash
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl Instructions: to create "configure" from "configure.ac", run:
|
||||
dnl Instructions: to create "configure" from "configure.ac", run: autoreconf
|
||||
dnl
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl Require autoconf >= 2.60
|
||||
AC_PREREQ([2.69])
|
||||
AC_PREREQ([2.60])
|
||||
|
||||
dnl Init autoconf
|
||||
AC_INIT
|
||||
AC_INIT([libwidgetextra], [1.0])
|
||||
dnl check we have some source (are in the right directory)
|
||||
AC_CONFIG_SRCDIR([NonGuiThread.h])
|
||||
AC_CONFIG_AUX_DIR([autotools])
|
||||
dnl we have some extra macros in m4/
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AM_INIT_AUTOMAKE([1.11 dist-xz foreign no-dist-gzip -Wall])
|
||||
AM_MAINTAINER_MODE([disable])
|
||||
|
||||
AM_PROG_AR
|
||||
LT_INIT
|
||||
|
||||
dnl -------------------------------------------------------
|
||||
dnl Checks for programs.
|
||||
dnl -------------------------------------------------------
|
||||
@@ -38,22 +43,6 @@ CFLAGS="$cflags_save"
|
||||
CPPFLAGS="$cppflags_save"
|
||||
CXXFLAGS="$cxxflags_save"
|
||||
|
||||
dnl we will need an "install" program to be available
|
||||
AC_PROG_INSTALL
|
||||
|
||||
dnl We have some extra variables which we need to subsitute into output files
|
||||
AC_SUBST(INSTALL_PREFIX)
|
||||
|
||||
dnl Make the install prefix available to the program so that the pkg-config file
|
||||
dnl can be created correctly
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
if [[ $prefix = "NONE" ]] ; then
|
||||
AC_DEFINE(INSTALL_PREFIX, "/usr/local",
|
||||
[define as prefix where Audacity is installed])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(INSTALL_PREFIX, "$prefix")
|
||||
fi
|
||||
|
||||
dnl Build Options
|
||||
|
||||
AC_ARG_ENABLE(static-wx,
|
||||
@@ -85,7 +74,7 @@ dnl ----------------------------------------------------
|
||||
dnl If user asked for debug, put debug in compiler flags
|
||||
dnl ----------------------------------------------------
|
||||
|
||||
if test x"$debug_preference" = "xyes" ; then
|
||||
if test "$debug_preference" = "yes"; then
|
||||
dnl we want debuging on
|
||||
AC_MSG_NOTICE([Adding -g for debugging to CFLAGS and CXXFLAGS ...])
|
||||
CFLAGS="${CFLAGS} -g "
|
||||
@@ -157,28 +146,19 @@ esac
|
||||
|
||||
dnl Gather wx arguments
|
||||
|
||||
LIBS="$LIBS `$WX_CONFIG $wxconfigargs --libs`"
|
||||
CPPFLAGS="$CPPFLAGS `$WX_CONFIG $wxconfigargs --cxxflags`"
|
||||
WX_CXXFLAGS=$($WX_CONFIG $wxconfigargs --cxxflags)
|
||||
WX_LIBS=$($WX_CONFIG $wxconfigargs --libs)
|
||||
AC_SUBST([WX_CXXFLAGS])
|
||||
AC_SUBST([WX_LIBS])
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
||||
|
||||
AC_CONFIG_FILES([Makefile libwidgetextra.pc libwidgetextra-uninstalled.pc])
|
||||
AC_CONFIG_FILES([libwidgetextra.pc Makefile])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
echo ""
|
||||
echo "Run 'configure --help' for an explanation of the possible options,"
|
||||
echo "otherwise run 'make' to build libwidgetextra."
|
||||
|
||||
dnl Indentation settings for Vim and Emacs and unique identifier for Arch, a
|
||||
dnl version control system. Please do not modify past this point.
|
||||
|
||||
|
||||
# Local Variables:
|
||||
# c-basic-offset: 3
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
#
|
||||
# vim: et sts=3 sw=3
|
||||
|
@@ -1,17 +0,0 @@
|
||||
# This pkg-config file lets you use the compiled lib without having to first
|
||||
# install it anywhere. Simply put the directory the pkg-config file is in on the
|
||||
# PKG_CONFIG_PATH and look for libwidgetextra as normal - the uninstalled file
|
||||
# is prefered to the installed one if both are found
|
||||
libdir=@abs_builddir@
|
||||
# The library always ends up in the build dir.
|
||||
includedir=@abs_srcdir@
|
||||
# The headers are always in the source dir
|
||||
|
||||
Name: lib-widget-extra
|
||||
Description: Extras for wxwidgets
|
||||
Requires:
|
||||
Version: 1
|
||||
|
||||
Libs: -L${libdir} -lwidgetextra
|
||||
Libs.private: @LIBS@
|
||||
Cflags: -I${includedir}
|
@@ -1,11 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: lib-widget-extra
|
||||
Name: @PACKAGE@
|
||||
Description: Extras for wxwidgets
|
||||
Requires:
|
||||
Version: 1
|
||||
|
||||
Libs: -L${libdir} -lwidgetextra
|
||||
Libs.private: @LIBS@
|
||||
Cflags: -I${includedir}
|
||||
Version: @VERSION@
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lwidgetextra
|
||||
|
Reference in New Issue
Block a user