X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=206b2691c86cfcfa5d7b6de4b90646778854f6b6;hb=b3a59c07e71c74191c2d1524dbd2f5412dd762db;hp=31ff8c8260e5fc92a7ee8a8df43af7d66da6bd22;hpb=880c1d98801b4edd0330145ab2a98d3edf575c59;p=vlc diff --git a/configure.ac b/configure.ac index 31ff8c8260..206b2691c8 100644 --- a/configure.ac +++ b/configure.ac @@ -646,19 +646,14 @@ AC_CHECK_FUNCS(inet_aton,,[ ]) ]) -dnl Check for getopt (always use builtin one on win32) -if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then -need_getopt=: -else -need_getopt=false -AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)], -[ # FreeBSD has a gnugetopt library for this: - AC_CHECK_LIB([gnugetopt],[getopt_long], - [AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) - VLC_ADD_LIBS([libvlccore],[-lgnugetopt])], - [need_getopt=:])]) -fi -AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt}) +dnl FreeBSD has a gnugetopt library for this: +GNUGETOPT_LIBS="" +AC_CHECK_FUNC(getopt_long,, [ + AC_CHECK_LIB([gnugetopt],[getopt_long], [ + GNUGETOPT_LIBS="-lgnugetopt" + ]) +]) +AC_SUBST(GNUGETOPT_LIBS) if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then AC_CHECK_LIB(m,cos,[