Changeset 445


Ignore:
Timestamp:
07/30/09 00:00:32 (15 years ago)
Author:
r2d
Message:
  • autotool changes to support symbol visibility on MinGW.
  • mpcchap build must be enabled with --enable-mpcchap
  • mpcgain is built only if replaygain is installed
  • -fvisibility-hidden is added only for gcc4 on Linux
Location:
libmpc/trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/Makefile.am

    r384 r445  
    11AUTOMAKE_OPTIONS = foreign
    2 SUBDIRS = include libmpcdec libmpcenc libmpcpsy libwavformat mpcenc mpc2sv8 \
    3         mpcchap mpccut mpcdec mpcgain wavcmp
     2
     3ACLOCAL_AMFLAGS = -I m4
     4
     5EXTRA_DIST = CMakeLists.txt libmpc.kdevelop docs win32
     6
     7if MPC_CHAP
     8  MPCCHAP_DIR = mpcchap
     9endif
     10if MPC_GAIN
     11  MPCGAIN_DIR = mpcgain
     12endif
     13
     14SUBDIRS = \
     15include \
     16libmpcdec \
     17libmpcenc \
     18libmpcpsy \
     19libwavformat \
     20mpcenc \
     21mpc2sv8 \
     22mpccut \
     23mpcdec \
     24wavcmp \
     25$(MPCCHAP_DIR) \
     26$(MPCGAIN_DIR)
     27
  • libmpc/trunk/configure.in

    r410 r445  
    1 AC_INIT(configure.in)
    2 AC_CONFIG_AUX_DIR(config)
    3 
    4 AM_CONFIG_HEADER(include/config.h)
    5 AM_INIT_AUTOMAKE(libmpcs, 0.1)
     1AC_INIT([libmpcs], [0.1])
     2AC_CONFIG_AUX_DIR([config])
     3AC_CONFIG_MACRO_DIR([m4])
     4AC_CONFIG_SRCDIR([libmpcdec/mpc_reader.c])
     5AM_CONFIG_HEADER([include/config.h])
     6AM_INIT_AUTOMAKE
    67
    78AC_LANG_C
    89AC_PROG_CC
    9 AM_PROG_LIBTOOL
     10AC_LIBTOOL_WIN32_DLL
     11AC_PROG_LIBTOOL
    1012
    11 AC_CHECK_HEADERS(replaygain/gain_analysis.h)
     13AC_CHECK_HEADERS([replaygain/gain_analysis.h])
     14AM_CONDITIONAL([MPC_GAIN], [test "x$ac_cv_header_replaygain_gain_analysis_h" = xyes])
    1215
    1316AC_CANONICAL_HOST()
     
    2427AC_SUBST([EXTRALIBS])
    2528
    26 AC_OUTPUT(Makefile include/Makefile libmpcdec/Makefile libmpcenc/Makefile \
    27         libmpcpsy/Makefile libwavformat/Makefile mpc2sv8/Makefile mpcchap/Makefile mpccut/Makefile \
    28         mpcdec/Makefile mpcenc/Makefile mpcgain/Makefile wavcmp/Makefile)
     29AC_ARG_ENABLE([mpcchap], [AS_HELP_STRING([--enable-mpcchap], [enable building mpcchap])])
     30AM_CONDITIONAL([MPC_CHAP], [test "x$enable_mpcchap" = xyes])
     31
     32
     33CHECK_VISIBILITY
     34
     35AC_CONFIG_FILES([
     36Makefile
     37include/Makefile
     38libmpcdec/Makefile
     39libmpcenc/Makefile
     40libmpcpsy/Makefile
     41libwavformat/Makefile
     42mpc2sv8/Makefile
     43mpcchap/Makefile
     44mpccut/Makefile
     45mpcdec/Makefile
     46mpcenc/Makefile
     47mpcgain/Makefile
     48wavcmp/Makefile
     49])
     50
     51AC_OUTPUT
  • libmpc/trunk/include/mpc/mpc_types.h

    r431 r445  
    127127#endif
    128128
    129 #ifdef __GNUC__
    130 # define MPC_API __attribute__ ((visibility("default")))
    131 #else
    132 # define MPC_API
     129/* DLL building support on win32 hosts */
     130#ifndef MPC_API
     131#   ifdef DLL_EXPORT      /* defined by libtool (if required) */
     132#       define MPC_API __declspec(dllexport)
     133#   endif
     134#   ifdef MPC_DLL_IMPORT  /* define if linking with this dll */
     135#       define MPC_API __declspec(dllimport)
     136#   endif
     137#   ifndef MPC_API     /* static linking or !_WIN32 */
     138#     if defined(__GNUC__) && (__GNUC__ >= 4)
     139#       define MPC_API __attribute__ ((visibility("default")))
     140#     else
     141#       define MPC_API
     142#     endif
     143#   endif
    133144#endif
    134145
  • libmpc/trunk/libmpcdec/Makefile.am

    r433 r445  
    1 INCLUDES = -I$(top_srcdir)/include
     1EXTRA_DIST = CMakeLists.txt
     2
     3AM_CPPFLAGS = -I$(top_srcdir)/include
     4
     5if HAVE_VISIBILITY
     6  AM_CFLAGS = -fvisibility=hidden
     7endif
    28
    39common_sources = ../common/crc32.c \
     
    814libmpcdec_la_SOURCES = huffman.c mpc_decoder.c mpc_reader.c \
    915        requant.c       streaminfo.c synth_filter.c mpc_bits_reader.c mpc_demux.c \
     16        mpc_bits_reader.h huffman.h decoder.h internal.h requant.h mpcdec_math.h \
    1017        $(common_sources)
    1118
    1219libmpcdec_la_LDFLAGS = -no-undefined -version-info 7:0:1
    13 
    14 noinst_HEADERS = mpc_bits_reader.h huffman.h decoder.h internal.h requant.h mpcdec_math.h
    15 AM_CFLAGS = -fpic -fvisibility=hidden
  • libmpc/trunk/libmpcenc/Makefile.am

    r225 r445  
    1 INCLUDES = -I$(top_srcdir)/include/
     1EXTRA_DIST = CMakeLists.txt
     2
     3AM_CPPFLAGS = -I$(top_srcdir)/include
     4
     5if HAVE_VISIBILITY
     6  AM_CFLAGS = -fvisibility=hidden
     7endif
     8
    29METASOURCES = AUTO
    310noinst_LIBRARIES = libmpcenc.a
    4 libmpcenc_a_SOURCES = analy_filter.c bitstream.c encode_sv7.c huffsv7.c quant.c
    5 
    6 
    7 noinst_HEADERS = libmpcenc.h
    8 
    9 
     11libmpcenc_a_SOURCES = analy_filter.c bitstream.c encode_sv7.c huffsv7.c quant.c libmpcenc.h
  • libmpc/trunk/libmpcpsy/Makefile.am

    r225 r445  
    1 INCLUDES = -I$(top_srcdir)/include/
     1EXTRA_DIST = CMakeLists.txt
     2
     3AM_CPPFLAGS = -I$(top_srcdir)/include
     4
     5if HAVE_VISIBILITY
     6  AM_CFLAGS = -fvisibility=hidden
     7endif
     8
    29METASOURCES = AUTO
    310noinst_LIBRARIES = libmpcpsy.a
    411libmpcpsy_a_SOURCES = ans.c cvd.c fft4g.c fft_routines.c psy.c psy_tab.c \
    5         profile.c
    6 noinst_HEADERS = libmpcpsy.h
     12        profile.c libmpcpsy.h
  • libmpc/trunk/libwavformat/Makefile.am

    r409 r445  
    1 INCLUDES =
     1EXTRA_DIST = CMakeLists.txt
     2
     3if HAVE_VISIBILITY
     4  AM_CFLAGS = -fvisibility=hidden
     5endif
     6
    27METASOURCES = AUTO
    38noinst_LIBRARIES = libwavformat.a
    4 noinst_HEADERS = libwaveformat.h
    5 libwavformat_a_SOURCES = input.c output.c
     9
     10libwavformat_a_SOURCES = input.c output.c libwaveformat.h
  • libmpc/trunk/mpc2sv8/Makefile.am

    r400 r445  
    1 INCLUDES = -I$(top_srcdir)/include
     1EXTRA_DIST = CMakeLists.txt
     2
     3AM_CPPFLAGS = -I$(top_srcdir)/include
     4
     5if HAVE_VISIBILITY
     6  AM_CFLAGS = -fvisibility=hidden
     7endif
    28
    39common_sources = ../common/crc32.c
  • libmpc/trunk/mpcchap/Makefile.am

    r409 r445  
     1EXTRA_DIST = CMakeLists.txt
     2
    13bin_PROGRAMS = mpcchap
    24
    35common_sources = ../common/tags.c ../common/crc32.c
    46
    5 INCLUDES = -I$(top_srcdir)/include
     7AM_CPPFLAGS = -I$(top_srcdir)/include
     8
     9if HAVE_VISIBILITY
     10  AM_CFLAGS = -fvisibility=hidden
     11endif
     12
    613METASOURCES = AUTO
    7 mpcchap_SOURCES = dictionary.c iniparser.c mpcchap.c $(common_sources)
     14mpcchap_SOURCES = dictionary.c iniparser.c mpcchap.c $(common_sources) \
     15dictionary.h iniparser.h
     16
    817mpcchap_LDADD = $(top_builddir)/libmpcdec/libmpcdec.la \
    918        $(top_builddir)/libmpcenc/libmpcenc.a \
    1019        -lm -lcuefile
    11 
    12 noinst_HEADERS = dictionary.h iniparser.h
  • libmpc/trunk/mpccut/Makefile.am

    r400 r445  
    1 INCLUDES = -I$(top_srcdir)/include
     1EXTRA_DIST = CMakeLists.txt
     2
     3AM_CPPFLAGS = -I$(top_srcdir)/include
     4
     5if HAVE_VISIBILITY
     6  AM_CFLAGS = -fvisibility=hidden
     7endif
    28
    39common_sources = ../common/crc32.c
  • libmpc/trunk/mpcdec/Makefile.am

    r232 r445  
    1 INCLUDES = -I$(top_srcdir)/libwavformat -I$(top_srcdir)/include
     1EXTRA_DIST = CMakeLists.txt
     2
     3AM_CPPFLAGS = -I$(top_srcdir)/libwavformat -I$(top_srcdir)/include
     4
     5if HAVE_VISIBILITY
     6  AM_CFLAGS = -fvisibility=hidden
     7endif
     8
    29METASOURCES = AUTO
    310bin_PROGRAMS = mpcdec
  • libmpc/trunk/mpcenc/Makefile.am

    r410 r445  
     1EXTRA_DIST = CMakeLists.txt
     2
     3if HAVE_VISIBILITY
     4  AM_CFLAGS = -fvisibility=hidden
     5endif
     6
    17bin_PROGRAMS = mpcenc
    28
     
    713
    814# set the include path found by configure
    9 INCLUDES = -I$(top_srcdir)/libmpcenc -I$(top_srcdir)/libmpcpsy \
    10         -I$(top_srcdir)/include/ $(all_includes)
     15AM_CPPFLAGS = -I$(top_srcdir)/libmpcenc -I$(top_srcdir)/libmpcpsy \
     16        -I$(top_srcdir)/include/ $(all_includes) \
     17        -DTRUE=1 -DFALSE=0
    1118
    1219# the library search path.
    1320mpcenc_LDFLAGS = $(all_libraries)
    1421mpcenc_SOURCES = keyboard.c mpcenc.c pipeopen.c stderr.c wave_in.c winmsg.c \
    15         $(common_sources)
     22        $(common_sources) \
     23        mpcenc.h predict.h config.h
     24
    1625mpcenc_LDADD = -lm \
    1726        $(EXTRALIBS) \
    1827        $(top_builddir)/libmpcpsy/libmpcpsy.a \
    1928        $(top_builddir)/libmpcenc/libmpcenc.a
    20 AM_CFLAGS = -DTRUE=1 -DFALSE=0
    2129
    22 noinst_HEADERS = mpcenc.h predict.h config.h
  • libmpc/trunk/mpcgain/Makefile.am

    r232 r445  
     1EXTRA_DIST = CMakeLists.txt
     2
     3AM_CPPFLAGS = -I$(top_srcdir)/include
     4
     5AM_CFLAGS = -ffast-math
     6
     7if HAVE_VISIBILITY
     8  AM_CFLAGS += -fvisibility=hidden
     9endif
     10
    111
    212METASOURCES = AUTO
     
    515        $(top_builddir)/libmpcdec/libmpcdec.la
    616mpcgain_SOURCES = mpcgain.c
    7 INCLUDES = -I$(top_srcdir)/include
    8 AM_CFLAGS = -ffast-math
  • libmpc/trunk/wavcmp/Makefile.am

    r282 r445  
    1 INCLUDES = -I$(top_srcdir)/libwavformat
     1AM_CPPFLAGS = -I$(top_srcdir)/libwavformat
     2
     3if HAVE_VISIBILITY
     4  AM_CFLAGS = -fvisibility=hidden
     5endif
     6
    27METASOURCES = AUTO
    38bin_PROGRAMS = wavcmp
Note: See TracChangeset for help on using the changeset viewer.