X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=abe3035970ef8fd78d2d75bfe795eb26d60d5db6;hb=792ed4d67f964ba5c2aa1b634260cae0fe91ada3;hp=c9644ea38b1df50aa3c1a5d2ee05c89d897dc023;hpb=43ab467903aaaebdffd9709f2f3584e91655fb6d;p=vlc diff --git a/configure.ac b/configure.ac index c9644ea38b..abe3035970 100644 --- a/configure.ac +++ b/configure.ac @@ -766,7 +766,7 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[ dnl Check for headers AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h stdbool.h getopt.h strings.h inttypes.h sys/int_types.h wchar.h) AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h) -AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h) +AC_CHECK_HEADERS([arpa/inet.h net/if.h netinet/in.h sys/socket.h netinet/udplite.h]) if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then AC_CHECK_HEADERS(machine/param.h sys/shm.h) AC_CHECK_HEADERS(linux/version.h) @@ -1011,6 +1011,27 @@ if test "${ac_cv_c_omit_frame_pointer}" != "no"; then VLC_ADD_CFLAGS([i420_yuy2_mmx],[-fomit-frame-pointer]) fi +dnl Check for -fvisibility=hidden +AC_CACHE_CHECK([if \$CC accepts -fvisibility=hidden], + [ac_cv_c_visibility_hidden], + [CFLAGS="${CFLAGS_save} -fvisibility=hidden" + AC_TRY_COMPILE([],,ac_cv_c_visibility_hidden=yes, ac_cv_c_visibility_hidden=no)]) +if test "${ac_cv_c_visibility_hidden}" != "no"; then + VLC_ADD_CFLAGS([libvlc plugin],[-fvisibility=hidden]) +fi + +dnl Check for -fvisibility-inlines-hidden (breaks x86_64 linkers) +dnl AC_LANG_PUSH(C++) +dnl AC_CACHE_CHECK([if \$CXX accepts -fvisibility-inlines-hidden], +dnl [ac_cv_c_visibility_inlines_hidden], +dnl [CXXFLAGS="${CXXFLAGS_save} -fvisibility-inlines-hidden" +dnl AC_TRY_COMPILE([],,ac_cv_c_visibility_inlines_hidden=yes, ac_cv_c_visibility_inlines_hidden=no)]) +dnl if test "${ac_cv_c_visibility_inlines_hidden}" != "no"; then +dnl VLC_ADD_CXXFLAGS([libvlc plugin],[-fvisibility-inlines-hidden]) +dnl fi +dnl CXXFLAGS="${CXXFLAGS_save}" +dnl AC_LANG_POP(C++) + dnl Check for -mdynamic-no-pic AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic], [ac_cv_c_dynamic_no_pic], @@ -1089,7 +1110,7 @@ if test "${ac_cv_c_attribute_format}" != "no"; then AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers) fi -dnl Check for __attribute__(()) +dnl Check for __attribute__((packed)) AC_CACHE_CHECK([for __attribute__((packed))], [ac_cv_c_attribute_packed], [ac_cv_c_attribute_packed=no @@ -1099,6 +1120,16 @@ if test "${ac_cv_c_attribute_packed}" != "no"; then AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs) fi +dnl Check for __attribute__((visibility())) +AC_CACHE_CHECK([for __attribute__((visibility()))], + [ac_cv_c_attribute_visibility], + [ac_cv_c_attribute_visibility=no + AC_TRY_COMPILE(, [extern __attribute__((visibility("default"))) int foo(int);], + [ac_cv_c_attribute_visibility=yes])]) +if test "${ac_cv_c_attribute_visibility}" != "no"; then + AC_DEFINE(HAVE_ATTRIBUTE_VISIBILITY, 1, Support for __attribute__((visibility())) for exporting symbols) +fi + dnl dnl Check the CPU dnl @@ -1126,8 +1157,8 @@ dnl default modules dnl VLC_ADD_PLUGINS([dummy logger memcpy]) VLC_ADD_PLUGINS([mpgv mpga m4v m4a h264 ps pva avi asf mp4 rawdv nsv real aiff mjpeg demuxdump flacsys tta]) -VLC_ADD_PLUGINS([cvdsub svcdsub spudec subsdec dvbsub mpeg_audio lpcm a52 dts cinepak flac]) -VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise extract]) +VLC_ADD_PLUGINS([cvdsub svcdsub spudec telx subsdec dvbsub mpeg_audio lpcm a52 dts cinepak flac]) +VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise extract sharpen]) VLC_ADD_PLUGINS([converter_fixed mono]) VLC_ADD_PLUGINS([trivial_resampler ugly_resampler]) VLC_ADD_PLUGINS([trivial_channel_mixer trivial_mixer]) @@ -2358,7 +2389,7 @@ if test "${enable_screen}" != "no"; then CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}" AC_CHECK_HEADERS(X11/Xlib.h, [ VLC_ADD_PLUGINS([screen]) - VLC_ADD_LDFLAGS([screen],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext]) + VLC_ADD_LDFLAGS([screen],[${X_LIBS} ${X_PRE_LIBS} -lX11]) VLC_ADD_CPPFLAGS([screen],[${X_CFLAGS}]) ]) CPPFLAGS="${CPPFLAGS_save}" @@ -3091,10 +3122,14 @@ AC_CHECK_HEADERS(sysfs/libsysfs.h, [ dnl dnl skins2 module dnl -AC_CHECK_HEADERS(libtar.h, [ - VLC_ADD_LDFLAGS([skins2],[-ltar]) -] ) +AC_ARG_ENABLE(libtar, + [ --enable libtar support for skins2 (default enabled)]) +AS_IF([test "${enable_libtar}" != "no"],[ + AC_CHECK_HEADERS(libtar.h, [ + VLC_ADD_LDFLAGS([skins2],[-ltar]) + ] ) +]) dnl @@ -3607,9 +3642,14 @@ if test "${enable_x11}" != "no" && test "${enable_x11}" = "yes"); then CPPFLAGS="${CPPFLAGS_save} ${X_FLAGS}" AC_CHECK_HEADERS(X11/Xlib.h, [ - VLC_ADD_PLUGINS([x11 panoramix]) - VLC_ADD_LDFLAGS([x11 panoramix],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext]) - VLC_ADD_CPPFLAGS([x11 panoramix],[${X_CFLAGS}]) + VLC_ADD_PLUGINS([panoramix]) + VLC_ADD_LDFLAGS([panoramix],[${X_LIBS} ${X_PRE_LIBS} -lX11]) + VLC_ADD_CPPFLAGS([panoramix],[${X_CFLAGS}]) + AC_CHECK_LIB(Xext, XShmAttach, [ + VLC_ADD_PLUGINS([x11]) + VLC_ADD_LDFLAGS([x11],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext]) + VLC_ADD_CPPFLAGS([x11],[${X_CFLAGS}]) + ]) ]) CPPFLAGS="${CPPFLAGS_save}" fi @@ -3785,6 +3825,8 @@ dnl SDL module dnl AC_ARG_ENABLE(sdl, [ --enable-sdl SDL support (default enabled)]) +AC_ARG_ENABLE(sdl-image, + [ --enable-sdl-image SDL image support (default enabled)]) if test "${enable_sdl}" != "no" then SDL_PATH="${PATH}" @@ -3838,21 +3880,23 @@ then Please install it and try again. Alternatively you can also configure with --disable-sdl.]) ])]) - AC_CHECK_HEADERS(${SDL_IMAGE}, [AC_DEFINE_UNQUOTED(SDL_IMAGE_INCLUDE_FILE, - <${SDL_IMAGE}>, Indicate the path of SDL_image.h) - VLC_ADD_PLUGINS([sdl_image]) - AC_CHECK_LIB(png, png_set_rows, - [VLC_ADD_LDFLAGS([sdl_image],[-lpng -lz])],[],[-lz]) - AC_CHECK_LIB(jpeg, jpeg_start_decompress, - [VLC_ADD_LDFLAGS([sdl_image],[-ljpeg])]) - AC_CHECK_LIB(tiff, TIFFClientOpen, - [VLC_ADD_LDFLAGS([sdl_image],[-ltiff])]) - VLC_ADD_LDFLAGS([sdl_image], [-lSDL_image])], - [ AC_CHECK_HEADERS(SDL_image.h, AC_DEFINE(SDL_IMAGE_INCLUDE_FILE, , - As a last resort we also test for SDL_image.h presence), - [ AC_MSG_WARN([The development package for SDL_image is not installed. -You should install it alongside your SDL package.]) - ])]) + AS_IF([ test "${enable_sdl_image}" != "no"],[ + AC_CHECK_HEADERS(${SDL_IMAGE}, [AC_DEFINE_UNQUOTED(SDL_IMAGE_INCLUDE_FILE, + <${SDL_IMAGE}>, Indicate the path of SDL_image.h) + VLC_ADD_PLUGINS([sdl_image]) + AC_CHECK_LIB(png, png_set_rows, + [VLC_ADD_LDFLAGS([sdl_image],[-lpng -lz])],[],[-lz]) + AC_CHECK_LIB(jpeg, jpeg_start_decompress, + [VLC_ADD_LDFLAGS([sdl_image],[-ljpeg])]) + AC_CHECK_LIB(tiff, TIFFClientOpen, + [VLC_ADD_LDFLAGS([sdl_image],[-ltiff])]) + VLC_ADD_LDFLAGS([sdl_image], [-lSDL_image])], + [ AC_CHECK_HEADERS(SDL_image.h, AC_DEFINE(SDL_IMAGE_INCLUDE_FILE, , + As a last resort we also test for SDL_image.h presence), + [ AC_MSG_WARN([The development package for SDL_image is not installed. + You should install it alongside your SDL package.]) + ])]) + ]) CPPFLAGS="${CPPFLAGS_save}" if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null then @@ -4542,7 +4586,7 @@ dnl dnl Skins2 module dnl AC_ARG_ENABLE(skins2, - [ --enable-skins2 Skins2 interface module (experimental)]) + [ --enable-skins2 Skins2 interface module (default disabled)]) if test "${enable_skins2}" = "yes" || (test "${SYS}" != "darwin" && test "${SYS}" != "beos" && test "${SYS}" != "mingwce" && test "${enable_skins2}" != "no"); then @@ -5268,7 +5312,7 @@ then AC_LANG_PUSH(C++) AC_CHECK_HEADERS(ole2.h, [AC_CHECK_HEADERS(olectl.h, - [ VLC_ADD_CPPFLAGS([activex],[-D_MIDL_USE_GUIDDEF_]) + [ VLC_ADD_CPPFLAGS([activex],[-DUNICODE -D_UNICODE -D_MIDL_USE_GUIDDEF_]) VLC_ADD_CXXFLAGS([activex],[-fno-exceptions]) VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi]) AC_CHECK_HEADERS(objsafe.h, @@ -5600,8 +5644,11 @@ dnl Pic and shared libvlc stuff dnl AS_IF([test "${SYS}" = "mingw32" || test "${enable_libtool}" != "no"], [ AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.]) - FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll" VLC_ADD_PLUGINS([${BUILTINS}]) + AS_IF([test "${SYS}" = "mingw32"], [ + FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll" + VLC_ADD_CPPFLAGS([libvlc],[-DDLL_EXPORT]) + ]) BUILTINS="" ], [ LDFLAGS_vlc="${LDFLAGS_vlc} ${LDFLAGS_libvlc}" @@ -5615,7 +5662,7 @@ dnl dnl Stuff used by the program dnl AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string]) -AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2006 the VideoLAN team", [Copyright string]) +AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2007 the VideoLAN team", [Copyright string]) AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line]) AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MAJOR,"${VERSION_MAJOR}", [version major number]) AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MINOR,"${VERSION_MINOR}", [version minor number])