diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0576151 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.sh -crlf +*.ac -crlf +*.am -crlf diff --git a/.github/workflows/automake-ci.yml b/.github/workflows/automake-ci.yml new file mode 100644 index 0000000..de6a219 --- /dev/null +++ b/.github/workflows/automake-ci.yml @@ -0,0 +1,44 @@ +name: Automake CI + +on: + push: + pull_request: + branches: [ "master" ] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + - name: check dependencies + run: | + if [[ "${{ matrix.os}}" == "macos-latest" ]]; then + brew install automake autoconf libtool + else + sudo apt-get update + sudo apt-get install autoconf libtool build-essential + fi + - name: autoreconf + run: | + autoupdate -f + autoreconf -i -f + - name: configure + run: ./configure + - name: make + run: make + - name: make check + run: make check + - name: make distcheck + run: make distcheck + - name: test + run: | + ./h264_analyze samples/JM_cqm_cabac.264 > tmp1.out + diff -u samples/JM_cqm_cabac.out tmp1.out + ./h264_analyze samples/x264_test.264 > tmp2.out + diff -u samples/x264_test.out tmp2.out + ./h264_analyze samples/riverbed-II-360p-48961.264 > tmp3.out + diff -u samples/riverbed-II-360p-48961.out tmp3.out diff --git a/Makefile.am b/Makefile.am index 737beca..c73fd70 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,6 +22,7 @@ pkginclude_HEADERS = h264_stream.h h264_sei.h h264_avcc.h bs.h clean-local: rm -rf *.pc + rm -f libh264bitstream-uninstalled.sh libh264bitstream.pc.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libh264bitstream.pc diff --git a/Makefile.unix b/Makefile.unix index b09674f..b954dd5 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -38,6 +38,7 @@ libh264bitstream.a: h264_stream.c h264_nal.c h264_stream.h h264_slice_data.c h26 clean: rm -f *.o libh264bitstream.a $(BINARIES) + rm -f libh264bitstream-uninstalled.sh libh264bitstream.pc.in dox: h264_stream.c h264_stream.h bs.h Doxyfile doxygen Doxyfile diff --git a/configure.ac b/configure.ac index f579eb7..f31ffbd 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(h264bitstream, 0.2.0, aizvorski@gmail.com) +AC_INIT([h264bitstream],[0.2.0],[aizvorski@gmail.com]) AC_CONFIG_SRCDIR(./h264_stream.c) @@ -11,9 +11,9 @@ AC_CANONICAL_TARGET EXTRA_CFLAGS='-std=c99 -Wno-error' if test ${target_os%%.*} = darwin9; then - EXTRA_CFLAGS="-force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" - CFLAGS+=${EXTRA_CFLAGS} - am_cv_CC_dependencies_compiler_type=gcc + EXTRA_CFLAGS="-force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" + CFLAGS+=${EXTRA_CFLAGS} + am_cv_CC_dependencies_compiler_type=gcc fi @@ -23,9 +23,10 @@ AM_INIT_AUTOMAKE([foreign]) AC_PROG_CC AM_PROG_CC_C_O -AC_PROG_LD AC_PROG_INSTALL -AC_PROG_LIBTOOL + +LT_INIT +LT_PATH_LD AC_CHECK_FUNCS(getopt_long, , AC_MSG_WARN(getopt_long not found. Long options will not work.) )