X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=configure.ac;h=61365e632a5ad8cd73c1b45917f76b662064983c;hp=4d0501b5534df5d9dc4b8bc195c4f0e20199d28d;hb=ce82736ddc9b974ed538ddf0ab7fae80fb5fc5d3;hpb=6c632dfdbeab2b583aca0be29b7c7b3620a97f07 diff --git a/configure.ac b/configure.ac index 4d0501b5..61365e63 100644 --- a/configure.ac +++ b/configure.ac @@ -287,7 +287,11 @@ fi AC_CHECK_HEADER(osl.h, [], have_osl=no) AC_CHECK_LIB([osl], [osl_open_table], [], have_osl=no) -if test "$have_osl" = "no"; then +if test "$have_osl" = "yes"; then + AC_SUBST(osl_cppflags) + osl_ldflags="$osl_libs -losl" + AC_SUBST(osl_ldflags) +else AC_MSG_WARN([libosl not found, can not build para_server. Download libosl at http://systemlinux.org/~maan/osl @@ -295,7 +299,6 @@ or execute git clone git://git.tuebingen.mpg.de/osl ]) fi -AC_SUBST(osl_cppflags) CPPFLAGS="$OLD_CPPFLAGS" LDFLAGS="$OLD_LDFLAGS" LIBS="$OLD_LIBS" @@ -350,10 +353,8 @@ if test "$check_openssl" = "yes"; then if test "$have_openssl" = "yes"; then AC_DEFINE(HAVE_OPENSSL, 1, [define to 1 to turn on openssl support]) AC_SUBST(openssl_cppflags) - openssl_libs="$openssl_libs -lssl -lcrypto" - server_ldflags="$server_ldflags $openssl_libs" - client_ldflags="$client_ldflags $openssl_libs" - audiod_ldflags="$audiod_ldflags $openssl_libs" + openssl_ldflags="$openssl_libs -lssl -lcrypto" + AC_SUBST(openssl_ldflags) server_errlist_objs="$server_errlist_objs crypt" client_errlist_objs="$client_errlist_objs crypt" @@ -392,10 +393,8 @@ if test "$check_gcrypt" = "yes"; then if test "$have_gcrypt" = "yes"; then AC_DEFINE(HAVE_GCRYPT, 1, [define to 1 to turn on gcrypt support]) AC_SUBST(gcrypt_cppflags) - gcrypt_libs="$gcrypt_libs -lgcrypt" - server_ldflags="$server_ldflags $gcrypt_libs" - client_ldflags="$client_ldflags $gcrypt_libs" - audiod_ldflags="$audiod_ldflags $gcrypt_libs" + gcrypt_ldflags="$gcrypt_libs -lgcrypt" + AC_SUBST(gcrypt_ldflags) server_errlist_objs="$server_errlist_objs gcrypt" client_errlist_objs="$client_errlist_objs gcrypt" @@ -911,18 +910,16 @@ if test "$have_alsa" = "yes"; then fi if test "$have_alsa" = "yes"; then + alsa_ldflags="-lasound" + AC_SUBST(alsa_ldflags) audiod_errlist_objs="$audiod_errlist_objs alsa_write" audiod_cmdline_objs="$audiod_cmdline_objs alsa_write" - audiod_ldflags="$audiod_ldflags -lasound" play_errlist_objs="$play_errlist_objs alsa_write" play_cmdline_objs="$play_cmdline_objs alsa_write" - play_ldflags="$play_ldflags -lasound" write_errlist_objs="$write_errlist_objs alsa_write" write_cmdline_objs="$write_cmdline_objs alsa_write" - write_ldflags="$write_ldflags -lasound" fade_errlist_objs="$fade_errlist_objs alsa_mix" - fade_ldflags="$fade_ldflags -lasound" writers="$writers alsa" default_writer="ALSA_WRITE" @@ -977,19 +974,19 @@ if test "$have_ao" = "yes"; then ]) fi if test "$have_ao" = "yes"; then + AC_SUBST(ao_cppflags) + ao_ldflags="$ao_libs -lao -lpthread" + AC_SUBST(ao_ldflags) + audiod_errlist_objs="$audiod_errlist_objs ao_write" audiod_cmdline_objs="$audiod_cmdline_objs ao_write" - audiod_ldflags="$audiod_ldflags -lao -lpthread" play_errlist_objs="$play_errlist_objs ao_write" play_cmdline_objs="$play_cmdline_objs ao_write" - play_ldflags="$play_ldflags -lao -lpthread" write_errlist_objs="$write_errlist_objs ao_write" write_cmdline_objs="$write_cmdline_objs ao_write" - write_ldflags="$write_ldflags $ao_libs -lao -lpthread" writers="$writers ao" - AC_SUBST(ao_cppflags) fi CPPFLAGS="$OLD_CPPFLAGS" @@ -1028,7 +1025,7 @@ if test "$have_curses" != "yes"; then fi if test "$have_readline" = "yes"; then - readline_libs="$readline_libs -lreadline" + readline_ldflags="$readline_libs -lreadline" AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"]) if test "$have_readline" = "no"; then # try with -lcurses # clear cache @@ -1036,7 +1033,7 @@ if test "$have_readline" = "yes"; then unset ac_cv_search_rl_free_keymap 2> /dev/null AC_SEARCH_LIBS([rl_free_keymap], [readline], [ have_readline=yes - readline_libs="$readline_libs -lcurses" + readline_ldflags="$readline_ldflags -lcurses" ], [], [-lcurses]) fi if test "$have_readline" = "no"; then # try with -ltermcap @@ -1045,19 +1042,17 @@ if test "$have_readline" = "yes"; then unset ac_cv_search_rl_free_keymap 2> /dev/null AC_SEARCH_LIBS([rl_free_keymap], [readline], [ have_readline=yes - readline_libs="$readline_libs -ltermcap" + readline_ldflags="$readline_ldflags -ltermcap" ], [], [-ltermcap]) fi fi if test "$have_readline" = "yes"; then + AC_SUBST(readline_cppflags) + AC_SUBST(readline_ldflags) client_errlist_objs="$client_errlist_objs interactive" - client_ldflags="$client_ldflags $readline_libs" audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time" - audioc_ldflags="$audioc_ldflags $readline_libs" play_errlist_objs="$play_errlist_objs interactive" - play_ldflags="$play_ldflags $readline_libs" - AC_SUBST(readline_cppflags) AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support) else AC_MSG_WARN([libreadline not found or unusable]) @@ -1088,17 +1083,17 @@ AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no) AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, []) if test "$have_samplerate" = "yes"; then + AC_SUBST(samplerate_cppflags) + samplerate_ldflags="$samplerate_libs -lsamplerate" + AC_SUBST(samplerate_ldflags) + filter_errlist_objs="$filter_errlist_objs resample_filter check_wav" filter_cmdline_objs="$filter_cmdline_objs resample_filter" audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav" audiod_cmdline_objs="$audiod_cmdline_objs resample_filter" play_errlist_objs="$play_errlist_objs resample_filter check_wav" play_cmdline_objs="$play_cmdline_objs resample_filter" - filter_ldflags="$filter_ldflags $samplerate_libs -lsamplerate" - audiod_ldflags="$audiod_ldflags $samplerate_libs -lsamplerate" - play_ldflags="$play_ldflags $samplerate_libs -lsamplerate" filters="$filters resample" - AC_SUBST(samplerate_cppflags) else AC_MSG_WARN([no resample support in para_audiod/para_filter]) fi @@ -1151,7 +1146,6 @@ if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \ version ggo " - server_ldflags="$server_ldflags $osl_libs -losl" else build_server="no" fi