]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - configure.ac
build: ldflags conversion: libosl.
[paraslash.git] / configure.ac
index d72b9797fb4655eb3ad7996b1ae59fa7fe637467..48b75ec5804dbb0603bd7d9b5d7b65aaf5bad272 100644 (file)
@@ -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"
@@ -1026,7 +1029,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
@@ -1034,7 +1037,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
@@ -1043,19 +1046,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])
@@ -1086,17 +1087,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
@@ -1149,7 +1150,6 @@ if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
                version
                ggo
        "
-       server_ldflags="$server_ldflags $osl_libs -losl"
 else
        build_server="no"
 fi