Skip to content

Commit 6dfcb27

Browse files
authored
Merge pull request #130 from msheby/fix-miscellaneous
Fix miscellaneous
2 parents 6a97b12 + b0df1c8 commit 6dfcb27

File tree

3 files changed

+53
-60
lines changed

3 files changed

+53
-60
lines changed

m4/ax_lib_expat.m4

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
##### http://autoconf-archive.cryp.to/ax_lib_expat.html
1+
# ===========================================================================
2+
# https://www.gnu.org/software/autoconf-archive/ax_lib_expat.html
3+
# ===========================================================================
24
#
35
# SYNOPSIS
46
#
@@ -26,29 +28,29 @@
2628
# This macro calls:
2729
#
2830
# AC_SUBST(EXPAT_CFLAGS)
31+
# AC_SUBST(EXPAT_LIBS)
2932
# AC_SUBST(EXPAT_LDFLAGS)
3033
# AC_SUBST(EXPAT_VERSION) -- only if version requirement is used
3134
#
3235
# And sets:
3336
#
3437
# HAVE_EXPAT
3538
#
36-
# LAST MODIFICATION
39+
# LICENSE
3740
#
38-
# 2007-12-05
41+
# Copyright (c) 2008 Mateusz Loskot <mateusz@loskot.net>
3942
#
40-
# COPYLEFT
41-
#
42-
# Copyright (c) 2007 Mateusz Loskot <mateusz@loskot.net>
43-
#
44-
# Copying and distribution of this file, with or without
45-
# modification, are permitted in any medium without royalty provided
46-
# the copyright notice and this notice are preserved.
43+
# Copying and distribution of this file, with or without modification, are
44+
# permitted in any medium without royalty provided the copyright notice
45+
# and this notice are preserved. This file is offered as-is, without any
46+
# warranty.
47+
48+
#serial 11
4749

4850
AC_DEFUN([AX_LIB_EXPAT],
4951
[
5052
AC_ARG_WITH([expat],
51-
AC_HELP_STRING([--with-expat=@<:@ARG@:>@],
53+
AS_HELP_STRING([--with-expat=@<:@ARG@:>@],
5254
[use Expat XML Parser from given prefix (ARG=path); check standard prefixes (ARG=yes); disable (ARG=no)]
5355
),
5456
[
@@ -70,37 +72,34 @@ AC_DEFUN([AX_LIB_EXPAT],
7072
fi
7173
],
7274
[
73-
# dnl Default behavior is implicit yes
74-
# if test -f /usr/local/include/expat.h ; then
75-
# expat_prefix=/usr/local
76-
# elif test -f /usr/include/expat.h ; then
77-
# expat_prefix=/usr
78-
# else
79-
# expat_prefix=""
80-
# fi
81-
dnl Default behavior is implicit no
82-
expat_prefix=""
83-
expat_requested="no"
75+
dnl Default behavior is implicit yes
76+
if test -f /usr/local/include/expat.h ; then
77+
expat_prefix=/usr/local
78+
elif test -f /usr/include/expat.h ; then
79+
expat_prefix=/usr
80+
else
81+
expat_prefix=""
82+
fi
8483
]
8584
)
8685
8786
AC_ARG_WITH([expat-inc],
88-
AC_HELP_STRING([--with-expat-inc=@<:@DIR@:>@],
87+
AS_HELP_STRING([--with-expat-inc=@<:@DIR@:>@],
8988
[path to Expat XML Parser headers]
9089
),
9190
[expat_include_dir="$withval"],
9291
[expat_include_dir=""]
9392
)
9493
AC_ARG_WITH([expat-lib],
95-
AC_HELP_STRING([--with-expat-lib=@<:@ARG@:>@],
94+
AS_HELP_STRING([--with-expat-lib=@<:@ARG@:>@],
9695
[link options for Expat XML Parser libraries]
9796
),
9897
[expat_lib_flags="$withval"],
9998
[expat_lib_flags=""]
10099
)
101100
102101
EXPAT_CFLAGS=""
103-
EXPAT_LDFLAGS=""
102+
EXPAT_LIBS=""
104103
EXPAT_VERSION=""
105104
106105
dnl
@@ -110,7 +109,8 @@ AC_DEFUN([AX_LIB_EXPAT],
110109
111110
if test -n "$expat_prefix"; then
112111
expat_include_dir="$expat_prefix/include"
113-
expat_lib_flags="-L$expat_prefix/lib64 -L$expat_prefix/lib -lexpat"
112+
expat_ld_flags="-L$expat_prefix/lib"
113+
expat_lib_flags="-lexpat"
114114
run_expat_test="yes"
115115
elif test "$expat_requested" = "yes"; then
116116
if test -n "$expat_include_dir" -a -n "$expat_lib_flags"; then
@@ -128,8 +128,11 @@ AC_DEFUN([AX_LIB_EXPAT],
128128
saved_CPPFLAGS="$CPPFLAGS"
129129
CPPFLAGS="$CPPFLAGS -I$expat_include_dir"
130130
131+
saved_LIBS="$LIBS"
132+
LIBS="$LIBS $expat_lib_flags"
133+
131134
saved_LDFLAGS="$LDFLAGS"
132-
LDFLAGS="$LDFLAGS $expat_lib_flags"
135+
LDFLAGS="$LDFLAGS $expat_ld_flags"
133136
134137
dnl
135138
dnl Check Expat headers
@@ -176,7 +179,8 @@ p = NULL;
176179
]]
177180
)],
178181
[
179-
EXPAT_LDFLAGS="$expat_lib_flags"
182+
EXPAT_LIBS="$expat_lib_flags"
183+
EXPAT_LDFLAGS="$expat_ld_flags"
180184
expat_lib_found="yes"
181185
AC_MSG_RESULT([found])
182186
],
@@ -190,6 +194,7 @@ p = NULL;
190194
191195
CPPFLAGS="$saved_CPPFLAGS"
192196
LDFLAGS="$saved_LDFLAGS"
197+
LIBS="$saved_LIBS"
193198
fi
194199
195200
AC_MSG_CHECKING([for Expat XML Parser])
@@ -199,6 +204,7 @@ p = NULL;
199204
200205
AC_SUBST([EXPAT_CFLAGS])
201206
AC_SUBST([EXPAT_LDFLAGS])
207+
AC_SUBST([EXPAT_LIBS])
202208
203209
HAVE_EXPAT="yes"
204210
else
@@ -274,8 +280,4 @@ p = NULL;
274280
AC_MSG_WARN([Expat XML Parser support requested but headers or library not found. Specify valid prefix of Expat using --with-expat=@<:@DIR@:>@ or provide include directory and linker flags using --with-expat-inc and --with-expat-lib])
275281
fi
276282
fi
277-
if test "$HAVE_EXPAT" = "yes"; then
278-
CPPFLAGS="$CPPFLAGS $EXPAT_CFLAGS -DHAVE_EXPAT=1"
279-
LDFLAGS="$LDFLAGS $EXPAT_LDFLAGS"
280-
fi
281283
])

m4/ax_lib_xerces.m4

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ===========================================================================
2-
# http://autoconf-archive.cryp.to/ax_lib_xerces.html
2+
# https://www.gnu.org/software/autoconf-archive/ax_lib_xerces.html
33
# ===========================================================================
44
#
55
# SYNOPSIS
@@ -34,24 +34,23 @@
3434
#
3535
# HAVE_XERCES
3636
#
37-
# LAST MODIFICATION
38-
#
39-
# 2008-04-12
40-
#
41-
# COPYLEFT
37+
# LICENSE
4238
#
4339
# Copyright (c) 2008 Mateusz Loskot <mateusz@loskot.net>
4440
#
4541
# Copying and distribution of this file, with or without modification, are
4642
# permitted in any medium without royalty provided the copyright notice
47-
# and this notice are preserved.
43+
# and this notice are preserved. This file is offered as-is, without any
44+
# warranty.
45+
46+
#serial 11
4847

4948
AC_DEFUN([AX_LIB_XERCES],
5049
[
51-
# AC_REQUIRE([ACX_PTHREAD])
50+
AC_REQUIRE([AX_PTHREAD])
5251
5352
AC_ARG_WITH([xerces],
54-
AC_HELP_STRING([--with-xerces=@<:@ARG@:>@],
53+
AS_HELP_STRING([--with-xerces=@<:@ARG@:>@],
5554
[use Xerces C++ Parser from given prefix (ARG=path); check standard prefixes (ARG=yes); disable (ARG=no)]
5655
),
5756
[
@@ -73,29 +72,26 @@ AC_DEFUN([AX_LIB_XERCES],
7372
fi
7473
],
7574
[
76-
# dnl Default behavior is implicit yes
77-
# if test -d /usr/local/include/xercesc ; then
78-
# xerces_prefix=/usr/local
79-
# elif test -d /usr/include/xercesc ; then
80-
# xerces_prefix=/usr
81-
# else
82-
# xerces_prefix=""
83-
# fi
84-
dnl Default behavior is implicit no
85-
xerces_prefix=""
86-
xerces_requested="no"
75+
dnl Default behavior is implicit yes
76+
if test -d /usr/local/include/xercesc ; then
77+
xerces_prefix=/usr/local
78+
elif test -d /usr/include/xercesc ; then
79+
xerces_prefix=/usr
80+
else
81+
xerces_prefix=""
82+
fi
8783
]
8884
)
8985
9086
AC_ARG_WITH([xerces-inc],
91-
AC_HELP_STRING([--with-xerces-inc=@<:@DIR@:>@],
87+
AS_HELP_STRING([--with-xerces-inc=@<:@DIR@:>@],
9288
[path to Xerces C++ Parser headers]
9389
),
9490
[xerces_include_dir="$withval"],
9591
[xerces_include_dir=""]
9692
)
9793
AC_ARG_WITH([xerces-lib],
98-
AC_HELP_STRING([--with-xerces-lib=@<:@ARG@:>@],
94+
AS_HELP_STRING([--with-xerces-lib=@<:@ARG@:>@],
9995
[link options for Xerces C++ Parser libraries]
10096
),
10197
[xerces_ldflags="$withval"],
@@ -136,7 +132,7 @@ AC_DEFUN([AX_LIB_XERCES],
136132
CPPFLAGS="$CPPFLAGS -I$xerces_include_dir -I$xerces_include_dir2"
137133
138134
saved_LDFLAGS="$LDFLAGS"
139-
LDFLAGS="$xerces_ldflags $PTHREAD_LDFLAGS $LDFLAGS"
135+
LDFLAGS="$LDFLAGS $xerces_ldflags $PTHREAD_LDFLAGS"
140136
141137
saved_LIBS="$LIBS"
142138
LIBS="$xerces_libs $PTHREAD_LIBS $LIBS"
@@ -290,8 +286,4 @@ XMLPlatformUtils::Initialize();
290286
AC_MSG_WARN([Xerces C++ Parser support requested but headers or library not found. Specify valid prefix of Xerces C++ using --with-xerces=@<:@DIR@:>@ or provide include directory and linker flags using --with-xerces-inc and --with-xerces-lib])
291287
fi
292288
fi
293-
if test "$HAVE_XERCES" = "yes"; then
294-
CPPFLAGS="$CPPFLAGS $XERCES_CPPFLAGS -DHAVE_XERCES_C=1"
295-
LDFLAGS="$LDFLAGS $XERCES_LDFLAGS $XERCES_LIBS"
296-
fi
297289
])

src/MXF.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1838,7 +1838,6 @@ ASDCP::MXF::decode_mca_string(const std::string& s, const mca_label_map_t& label
18381838
{
18391839
channel_descr->RFC5646SpokenLanguage = current_language;
18401840
}
1841-
current_language.empty();
18421841
channel_descr->MCALabelDictionaryID = i->second.ul;
18431842
descriptor_list.push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(channel_descr));
18441843
symbol_buf.clear();

0 commit comments

Comments
 (0)