Skip to content

Commit

Permalink
Build libltdl recursively instead of as a sub-project
Browse files Browse the repository at this point in the history
Building libltdl recursively now eliminates the second 'configure' run
inside the libltdl directory and requires the distribution of fewer
files and quiets compilation.

Also, if the 'configure' option '--with-included-ltdl' is not passed and
a system libltdl is found, the included libltdl directory will not even
be built.  Only when the included libltdl is needed will it be built.
  • Loading branch information
N0NB committed Apr 22, 2013
1 parent dae5386 commit 74a6e7e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Makefile.am
Expand Up @@ -9,7 +9,11 @@ pkgconfig_DATA = hamlib.pc
EXTRA_DIST = PLAN TODO LICENSE hamlib.m4 hamlib.pc.in README.developer \
README.betatester README.win32

SUBDIRS = libltdl macros include lib src \
SUBDIRS =
if BUILD_LIBLTDL
SUBDIRS += libltdl
endif
SUBDIRS += macros include lib src \
@BACKEND_LIST@ \
@ROT_BACKEND_LIST@ \
@BINDINGS@ \
Expand Down
12 changes: 10 additions & 2 deletions configure.ac
Expand Up @@ -241,11 +241,18 @@ dnl the frontend and backend libs are not linked. May need a recipe outside
dnl of Libtool if these are needed.
LT_INIT([dlopen win32-dll disable-static])

dnl Enable building of the convenience libltdl library
dnl Enable building of the convenience libltdl library recursively
dnl (requires --with-included-ltdl be given to configure for the included
dnl libltdl to be used instead of an installed version), useful on systems
dnl where libltdl-dev is not installed.
LTDL_INIT([convenience])
LTDL_INIT([convenience recursive])

dnl Ugly hack to work around libtool LT_CONFIG_H bug #12262
dnl http://lists.gnu.org/archive/html/bug-libtool/2012-08/msg00007.html
AC_CONFIG_COMMANDS_PRE([LT_CONFIG_H=`expr "$LT_CONFIG_H" : '.*/\(.*\)'`])

dnl Only build libtldl if it is needed.
AM_CONDITIONAL([BUILD_LIBLTDL], [test x"${with_included_ltdl}" = "xyes"])


## -------------------------- ##
Expand Down Expand Up @@ -652,6 +659,7 @@ AC_SUBST([AM_CPPFLAGS])
AC_CONFIG_FILES([Makefile
macros/Makefile
include/Makefile
libltdl/Makefile
lib/Makefile
dummy/Makefile
yaesu/Makefile
Expand Down

0 comments on commit 74a6e7e

Please sign in to comment.