Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup/documentation #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 19 additions & 49 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -73,28 +73,14 @@ if test -z "$GCC"; then
PROFILE="-g -p" ;;
esac
else

DEBUG="-g -Wall -fsigned-char"
CFLAGS="-fsigned-char"
PROFILE="-g -pg -fsigned-char"
case $host in
*-*-linux*)
PLUGIN_LDFLAGS="-export-dynamic -avoid-version"
DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
CFLAGS="-O20 -ffast-math -D_REENTRANT -fsigned-char"
PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";;
sparc-sun-*)
PLUGIN_LDFLAGS="-export-dynamic -avoid-version"
DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
CFLAGS="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char"
PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char" ;;
*-darwin*)
PLUGIN_LDFLAGS="-module -avoid-version"
DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
CFLAGS="-D__NO_MATH_INLINES -fsigned-char"
PROFILE="-g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
PLUGIN_LDFLAGS="-module -avoid-version" ;;
*)
PLUGIN_LDFLAGS="-export-dynamic -avoid-version"
DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char"
PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
PLUGIN_LDFLAGS="-export-dynamic -avoid-version" ;;
esac
fi
CFLAGS="$CFLAGS $cflags_save -DAO_BUILDING_LIBAO"
Expand Down Expand Up @@ -166,35 +152,6 @@ esac
AC_DEFINE_UNQUOTED(DLOPEN_FLAG, $DLOPEN_FLAG)
AC_DEFINE_UNQUOTED(SHARED_LIB_EXT, "$SHARED_LIB_EXT")

dnl ==============================
dnl Checks for types
dnl ==============================

AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)

case 2 in
$ac_cv_sizeof_short) SIZE16="short";;
$ac_cv_sizeof_int) SIZE16="int";;
esac

case 4 in
$ac_cv_sizeof_short) SIZE32="short";;
$ac_cv_sizeof_int) SIZE32="int";;
$ac_cv_sizeof_long) SIZE32="long";;
esac

if test -z "$SIZE16"; then
AC_MSG_ERROR(No 16 bit type found on this platform!)
fi
if test -z "$SIZE32"; then
AC_MSG_ERROR(No 32 bit type found on this platform!)
fi

AC_SUBST(SIZE16)
AC_SUBST(SIZE32)

dnl ======================================
dnl Disable default use of SLP in roar
dnl until such time as SLP doesn't block
Expand Down Expand Up @@ -462,11 +419,24 @@ AM_CONDITIONAL(HAVE_PULSE,test "x$have_pulse" = xyes)
dnl Orphaned driver. We'll probably dump it soon.
AM_CONDITIONAL(HAVE_SOLARIS,test "x$have_solaris" = xyes)

dnl Build documentation
docs_enabled=yes
AC_ARG_ENABLE([docs], [AS_HELP_STRING([--disable-docs],
[skip docs during build]) ], [ docs_enabled=$enableval ], [])

AC_CHECK_PROG([HAS_SPHINX_BUILD], [sphinx-build], [yes])
if test x${docs_enabled} = xyes; then
if test x${HAS_SPHINX_BUILD} = xyes; then
build_html=yes
fi
fi
AM_CONDITIONAL(BUILD_HTML, [test x$build_html = xyes])

dnl Plugins get special LDFLAGS
AC_SUBST(PLUGIN_LDFLAGS)


AC_OUTPUT([Makefile src/Makefile doc/Makefile include/Makefile include/ao/Makefile include/ao/os_types.h src/plugins/Makefile src/plugins/esd/Makefile src/plugins/oss/Makefile src/plugins/alsa/Makefile src/plugins/sun/Makefile src/plugins/irix/Makefile src/plugins/arts/Makefile src/plugins/macosx/Makefile src/plugins/nas/Makefile src/plugins/pulse/Makefile src/plugins/sndio/Makefile src/plugins/roar/Makefile ao.pc])
AC_OUTPUT([Makefile src/Makefile doc/Makefile include/Makefile include/ao/Makefile src/plugins/Makefile src/plugins/esd/Makefile src/plugins/oss/Makefile src/plugins/alsa/Makefile src/plugins/sun/Makefile src/plugins/irix/Makefile src/plugins/arts/Makefile src/plugins/macosx/Makefile src/plugins/nas/Makefile src/plugins/pulse/Makefile src/plugins/sndio/Makefile src/plugins/roar/Makefile ao.pc])

AS_AC_EXPAND(LIBDIR, ${libdir})
AS_AC_EXPAND(INCLUDEDIR, ${includedir})
Expand Down
3 changes: 3 additions & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.buildinfo
.sphinx-cache

67 changes: 24 additions & 43 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,46 +1,27 @@
## Process this with automake to create Makefile.in

AUTOMAKE_OPTIONS = foreign

docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
src_files=\
build/api.rst \
build/plugins.rst \
build/config.rst \
build/drivers.rst \
build/index.rst
if BUILD_HTML
html_files= \
search.html \
config.html \
index.html \
plugins.html \
genindex.html \
api.html \
drivers.html
else
html_files=
endif

$(html_files) .sphinx-cache: $(src_files)
sphinx-build -b html -d .sphinx-cache $(top_srcdir)/doc/build .

# We list all of these as opposed to using a wildcard so that
# building outside the source directory works.
doc_DATA = ao_append_option.html \
ao_close.html \
ao_default_driver_id.html \
ao_device.html \
ao_driver_id.html \
ao_driver_info.html \
ao_driver_info_list.html \
ao_file_extension.html \
ao_free_options.html \
ao_info.html \
ao_initialize.html \
ao_is_big_endian.html \
ao_open_file.html \
ao_open_live.html \
ao_option.html \
ao_play.html \
ao_plugin_close.html \
ao_plugin_device_clear.html \
ao_plugin_device_init.html \
ao_plugin_driver_info.html \
ao_plugin_file_extension.html \
ao_plugin_open.html \
ao_plugin_play.html \
ao_plugin_set_option.html \
ao_plugin_test.html \
ao_sample_format.html \
ao_shutdown.html \
config.html \
drivers.html \
index.html \
libao-api.html \
overview.html \
plugin-api.html \
plugin-overview.html \
ao_example.c \
style.css
doc_DATA=$(html_files) $(wildcard _static/*) $(src_files)
# distribute pre-built docs
EXTRA_DIST=$(doc_DATA)

EXTRA_DIST = $(doc_DATA)
67 changes: 0 additions & 67 deletions doc/ao_append_global_option.html

This file was deleted.

68 changes: 0 additions & 68 deletions doc/ao_append_option.html

This file was deleted.

63 changes: 0 additions & 63 deletions doc/ao_close.html

This file was deleted.

Loading