From 34102f72a2cac80ccfb99692d9438f6e335672b0 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Mon, 23 Jun 2014 11:09:01 +0200 Subject: [PATCH 01/18] Hand-written makefile Compile toxic without autotools --- src/Makefile | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/Makefile diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..0e508db --- /dev/null +++ b/src/Makefile @@ -0,0 +1,40 @@ +SUPPORT_AUDIO ?= 0 + +LIBS = ncurses + +CFLAGS = -std=gnu99 -pthread +LDFLAGS = -ltoxcore -ltoxav -ltoxdns -ldl -lresolv +DESTDIR=/usr/local + +OBJ = chat.o chat_commands.o configdir.o dns.o execute.o +OBJ += file_senders.o friendlist.o global_commands.o groupchat.o line_info.o +OBJ += log.o misc_tools.o prompt.o settings.o toxic.o toxic_strings.o windows.o + +ifeq ($(SUPPORT_AUDIO), 1) + CFLAGS += "-D_SUPPORT_AUDIO" + OBJ += device.o audio_call.o + LIBS += openal +endif + +CFLAGS += $(shell pkg-config --cflags $(LIBS)) +LDFLAGS += $(shell pkg-config --libs $(LIBS)) + +all: toxic + +toxic: $(OBJ) + $(CC) $(CFLAGS) -o toxic $(OBJ) $(LDFLAGS) + +install: toxic + mkdir -pv $(DESTDIR)/bin + install -m 0755 toxic $(DESTDIR)/bin + +-include $(OBJ:.o=.d) + +%.o: %.c + $(CC) $(CFLAGS) -o $*.o -c $*.c + $(CC) -MM $(CFLAGS) $*.c > $*.d + +clean: + rm -rf *.d *.o toxic + +.PHONY: clean all install From b0bfb13241e438a4c5050f6877c4d90ecc9c113d Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Mon, 23 Jun 2014 14:07:23 +0200 Subject: [PATCH 02/18] Update Makefile Cosmetic fixes --- src/Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Makefile b/src/Makefile index 0e508db..120c442 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,7 +3,7 @@ SUPPORT_AUDIO ?= 0 LIBS = ncurses CFLAGS = -std=gnu99 -pthread -LDFLAGS = -ltoxcore -ltoxav -ltoxdns -ldl -lresolv +LDFLAGS = -ltoxcore -ltoxdns -ldl -lresolv DESTDIR=/usr/local OBJ = chat.o chat_commands.o configdir.o dns.o execute.o @@ -11,13 +11,16 @@ OBJ += file_senders.o friendlist.o global_commands.o groupchat.o line_info.o OBJ += log.o misc_tools.o prompt.o settings.o toxic.o toxic_strings.o windows.o ifeq ($(SUPPORT_AUDIO), 1) - CFLAGS += "-D_SUPPORT_AUDIO" + CFLAGS += -D_SUPPORT_AUDIO + LDFLAGS += -ltoxav OBJ += device.o audio_call.o LIBS += openal endif -CFLAGS += $(shell pkg-config --cflags $(LIBS)) -LDFLAGS += $(shell pkg-config --libs $(LIBS)) +ifneq ($(LIBS),) + CFLAGS += $(shell pkg-config --cflags $(LIBS)) + LDFLAGS += $(shell pkg-config --libs $(LIBS)) +endif all: toxic From 9f8a6a8b6bbdedc3e9feec22116e7696db89e457 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Mon, 23 Jun 2014 15:34:32 +0200 Subject: [PATCH 03/18] Use pkg-config for toxcore and toxav --- src/Makefile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Makefile b/src/Makefile index 120c442..f40799b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,9 +1,9 @@ SUPPORT_AUDIO ?= 0 -LIBS = ncurses +LIBS = libtoxcore ncurses CFLAGS = -std=gnu99 -pthread -LDFLAGS = -ltoxcore -ltoxdns -ldl -lresolv +LDFLAGS = -ldl -lresolv DESTDIR=/usr/local OBJ = chat.o chat_commands.o configdir.o dns.o execute.o @@ -11,10 +11,15 @@ OBJ += file_senders.o friendlist.o global_commands.o groupchat.o line_info.o OBJ += log.o misc_tools.o prompt.o settings.o toxic.o toxic_strings.o windows.o ifeq ($(SUPPORT_AUDIO), 1) - CFLAGS += -D_SUPPORT_AUDIO - LDFLAGS += -ltoxav - OBJ += device.o audio_call.o - LIBS += openal +CHECK_OPENAL = $(shell pkg-config openal || echo -n "no_audio") +CHECK_TOXAV = $(shell pkg-config libtoxav || echo -n "no_audio") +ifeq (no_audio, $(filter no_audio, $(CHECK_OPENAL) $(CHECK_TOXAV))) + SUPPORT_AUDIO = 0 +else + CFLAGS += -D_SUPPORT_AUDIO + OBJ += device.o audio_call.o + LIBS += openal libtoxav +endif endif ifneq ($(LIBS),) From 717f8986cd49d896d1566e68973f6e261d40a29f Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Mon, 23 Jun 2014 21:55:32 +0200 Subject: [PATCH 04/18] Makefile: checks for libs --- src/Makefile | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/src/Makefile b/src/Makefile index f40799b..7a25215 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,30 +1,43 @@ -SUPPORT_AUDIO ?= 0 - LIBS = libtoxcore ncurses CFLAGS = -std=gnu99 -pthread LDFLAGS = -ldl -lresolv -DESTDIR=/usr/local +DESTDIR ?= /usr/local OBJ = chat.o chat_commands.o configdir.o dns.o execute.o OBJ += file_senders.o friendlist.o global_commands.o groupchat.o line_info.o OBJ += log.o misc_tools.o prompt.o settings.o toxic.o toxic_strings.o windows.o -ifeq ($(SUPPORT_AUDIO), 1) -CHECK_OPENAL = $(shell pkg-config openal || echo -n "no_audio") -CHECK_TOXAV = $(shell pkg-config libtoxav || echo -n "no_audio") -ifeq (no_audio, $(filter no_audio, $(CHECK_OPENAL) $(CHECK_TOXAV))) - SUPPORT_AUDIO = 0 +AUDIO_LIBS = libtoxav openal +AUDIO_CFLAGS = -D_SUPPORT_AUDIO +AUDIO_OBJ = device.o audio_call.o + +CHECK_AUDIO_LIBS = $(shell pkg-config $(AUDIO_LIBS) || echo -n "error") +ifneq ($(CHECK_AUDIO_LIBS), error) + LIBS += $(AUDIO_LIBS) + CFLAGS += $(AUDIO_CFLAGS) + OBJ += $(AUDIO_OBJ) else - CFLAGS += -D_SUPPORT_AUDIO - OBJ += device.o audio_call.o - LIBS += openal libtoxav +ifneq ($(MAKECMDGOALS), clean) +MISSING_AUDIO_LIBS = $(shell for lib in $(AUDIO_LIBS) ; do if ! pkg-config $$lib ; then echo $$lib ; fi ; done) +$(warning WARNING -- Toxic will be compiled without audio support) +$(warning WARNING -- You need these libraries for audio support) +$(warning WARNING -- $(MISSING_AUDIO_LIBS)) endif endif -ifneq ($(LIBS),) - CFLAGS += $(shell pkg-config --cflags $(LIBS)) - LDFLAGS += $(shell pkg-config --libs $(LIBS)) +CHECK_LIBS = $(shell pkg-config $(LIBS) || echo -n "error") +ifneq ($(CHECK_LIBS), error) + CFLAGS += $(shell pkg-config --cflags $(LIBS)) + LDFLAGS += $(shell pkg-config --libs $(LIBS)) +else +ifneq ($(MAKECMDGOALS), clean) +MISSING_LIBS = $(shell for lib in $(LIBS) ; do if ! pkg-config $$lib ; then echo $$lib ; fi ; done) +$(warning ERROR -- Cannot compile Toxic) +$(warning ERROR -- You need these libraries) +$(warning ERROR -- $(MISSING_LIBS)) +$(error ERROR) +endif endif all: toxic @@ -36,8 +49,6 @@ install: toxic mkdir -pv $(DESTDIR)/bin install -m 0755 toxic $(DESTDIR)/bin --include $(OBJ:.o=.d) - %.o: %.c $(CC) $(CFLAGS) -o $*.o -c $*.c $(CC) -MM $(CFLAGS) $*.c > $*.d @@ -45,4 +56,6 @@ install: toxic clean: rm -rf *.d *.o toxic +-include $(OBJ:.o=.d) + .PHONY: clean all install From 1daa4c5ca699080b5cfa544fae4522e3ac9ceccc Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Mon, 23 Jun 2014 22:32:10 +0200 Subject: [PATCH 05/18] Makefile: add toxic version --- src/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 7a25215..30d5a7b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,10 @@ +TOXIC_VERSION = 0.4.1 +REV = $(shell git rev-list HEAD --count) +VERSION = $(TOXIC_VERSION)_r$(REV) + LIBS = libtoxcore ncurses -CFLAGS = -std=gnu99 -pthread +CFLAGS = -DTOXICVER="\"$(VERSION)\"" -std=gnu99 -pthread LDFLAGS = -ldl -lresolv DESTDIR ?= /usr/local From f00c218e5624bbf20d7014caa2cf051ae1ae78fc Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Mon, 23 Jun 2014 23:22:32 +0200 Subject: [PATCH 06/18] Remove autotools --- build/Makefile.am | 72 ----------------------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 build/Makefile.am diff --git a/build/Makefile.am b/build/Makefile.am deleted file mode 100644 index b7736f7..0000000 --- a/build/Makefile.am +++ /dev/null @@ -1,72 +0,0 @@ -#Don't change this unless needed, else you'll break stuff - -bin_PROGRAMS = toxic - - -toxic_SOURCES = $(top_srcdir)/src/toxic.c \ - $(top_srcdir)/src/toxic.h \ - $(top_srcdir)/src/chat.h \ - $(top_srcdir)/src/chat.c \ - $(top_srcdir)/src/configdir.h \ - $(top_srcdir)/src/configdir.c \ - $(top_srcdir)/src/prompt.h \ - $(top_srcdir)/src/prompt.c \ - $(top_srcdir)/src/friendlist.h \ - $(top_srcdir)/src/friendlist.c \ - $(top_srcdir)/src/windows.c \ - $(top_srcdir)/src/windows.h \ - $(top_srcdir)/src/groupchat.c \ - $(top_srcdir)/src/groupchat.h \ - $(top_srcdir)/src/global_commands.c \ - $(top_srcdir)/src/global_commands.h \ - $(top_srcdir)/src/chat_commands.c \ - $(top_srcdir)/src/chat_commands.h \ - $(top_srcdir)/src/execute.c \ - $(top_srcdir)/src/execute.h \ - $(top_srcdir)/src/misc_tools.c \ - $(top_srcdir)/src/misc_tools.h \ - $(top_srcdir)/src/toxic_strings.c \ - $(top_srcdir)/src/toxic_strings.h \ - $(top_srcdir)/src/log.c \ - $(top_srcdir)/src/log.h \ - $(top_srcdir)/src/file_senders.c \ - $(top_srcdir)/src/file_senders.h \ - $(top_srcdir)/src/line_info.c \ - $(top_srcdir)/src/line_info.h \ - $(top_srcdir)/src/settings.c \ - $(top_srcdir)/src/settings.h \ - $(top_srcdir)/src/dns.c \ - $(top_srcdir)/src/dns.h - -toxic_CFLAGS = -I$(top_srcdir) \ - $(NCURSES_CFLAGS) \ - $(LIBSODIUM_CFLAGS) \ - $(LIBTOXCORE_CFLAGS) \ - $(PTHREAD_CFLAGS) - -toxic_CPPFLAGS = '-DTOXICVER="$(TOXIC_VERSION)"' - -toxic_LDADD = $(LIBTOXCORE_LDFLAGS) \ - $(LIBSODIUM_LDFLAGS) \ - $(NCURSES_LIBS) \ - $(LIBTOXCORE_LIBS) \ - $(LIBSODIUM_LIBS) \ - $(WINSOCK2_LIBS) \ - $(PTHREAD_LIBS) - - -# For audio support -if BUILD_AV - -toxic_SOURCES += $(top_srcdir)/src/audio_call.c \ - $(top_srcdir)/src/audio_call.h \ - $(top_srcdir)/src/device.c \ - $(top_srcdir)/src/device.h - -toxic_CFLAGS += $(LIBTOXAV_CFLAGS) \ - $(OPENAL_CFLAGS) \ - -Wimplicit-function-declaration - -toxic_LDADD += $(LIBTOXAV_LIBS) \ - $(OPENAL_LIBS) -endif From c52fe21237c5e43185d56ab9f77d6aabe9da2e52 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Mon, 23 Jun 2014 23:23:05 +0200 Subject: [PATCH 07/18] Remove autotools --- m4/ax_pthread.m4 | 317 ----------------------------------------------- 1 file changed, 317 deletions(-) delete mode 100644 m4/ax_pthread.m4 diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4 deleted file mode 100644 index 6d400ed..0000000 --- a/m4/ax_pthread.m4 +++ /dev/null @@ -1,317 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_pthread.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro figures out how to build C programs using POSIX threads. It -# sets the PTHREAD_LIBS output variable to the threads library and linker -# flags, and the PTHREAD_CFLAGS output variable to any special C compiler -# flags that are needed. (The user can also force certain compiler -# flags/libs to be tested by setting these environment variables.) -# -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) -# -# NOTE: You are assumed to not only compile your program with these flags, -# but also link it with them as well. e.g. you should link with -# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# -# If you are only building threads programs, you may wish to use these -# variables in your default LIBS, CFLAGS, and CC: -# -# LIBS="$PTHREAD_LIBS $LIBS" -# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -# CC="$PTHREAD_CC" -# -# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -# -# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the -# PTHREAD_PRIO_INHERIT symbol is defined when compiling with -# PTHREAD_CFLAGS. -# -# ACTION-IF-FOUND is a list of shell commands to run if a threads library -# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -# is not found. If ACTION-IF-FOUND is not specified, the default action -# will define HAVE_PTHREAD. -# -# Please let the authors know if this macro fails on any platform, or if -# you have any other suggestions or comments. This macro was based on work -# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -# Alejandro Forero Cuervo to the autoconf macro repository. We are also -# grateful for the helpful feedback of numerous users. -# -# Updated for Autoconf 2.68 by Daniel Richard G. -# -# LICENSE -# -# Copyright (c) 2008 Steven G. Johnson -# Copyright (c) 2011 Daniel Richard G. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Archive. When you make and distribute a -# modified version of the Autoconf Macro, you may extend this special -# exception to the GPL to apply to your modified version as well. - -#serial 20 - -AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) -AC_DEFUN([AX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_PUSH([C]) -ax_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes) - AC_MSG_RESULT($ax_pthread_ok) - if test x"$ax_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case ${host_os} in - solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" - ;; - - darwin*) - ax_pthread_flags="-pthread $ax_pthread_flags" - ;; -esac - -if test x"$ax_pthread_ok" = xno; then -for flag in $ax_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no) - if test x"$ax_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include - static void routine(void *a) { a = 0; } - static void *start_routine(void *a) { return a; }], - [pthread_t th; pthread_attr_t attr; - pthread_create(&th, 0, start_routine, 0); - pthread_join(th, 0); - pthread_attr_init(&attr); - pthread_cleanup_push(routine, 0); - pthread_cleanup_pop(0) /* ; */])], - [ax_pthread_ok=yes], - []) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($ax_pthread_ok) - if test "x$ax_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$ax_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], - [int attr = $attr; return attr /* ; */])], - [attr_name=$attr; break], - []) - done - AC_MSG_RESULT($attr_name) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case ${host_os} in - aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; - osf* | hpux*) flag="-D_REENTRANT";; - solaris*) - if test "$GCC" = "yes"; then - flag="-D_REENTRANT" - else - flag="-mt -D_REENTRANT" - fi - ;; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], - ax_cv_PTHREAD_PRIO_INHERIT, [ - AC_LINK_IFELSE([ - AC_LANG_PROGRAM([[#include ]], [[int i = PTHREAD_PRIO_INHERIT;]])], - [ax_cv_PTHREAD_PRIO_INHERIT=yes], - [ax_cv_PTHREAD_PRIO_INHERIT=no]) - ]) - AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], - AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.])) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: compile with *_r variant - if test "x$GCC" != xyes; then - case $host_os in - aix*) - AS_CASE(["x/$CC"], - [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], - [#handle absolute path differently from PATH based program lookup - AS_CASE(["x$CC"], - [x/*], - [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], - [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) - ;; - esac - fi -fi - -test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$ax_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - ax_pthread_ok=no - $2 -fi -AC_LANG_POP -])dnl AX_PTHREAD From fec501801e8c3ea8b868fcbafd411d8b099d84b5 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Mon, 23 Jun 2014 23:23:17 +0200 Subject: [PATCH 08/18] Remove autotools --- m4/pkg.m4 | 199 ------------------------------------------------------ 1 file changed, 199 deletions(-) delete mode 100644 m4/pkg.m4 diff --git a/m4/pkg.m4 b/m4/pkg.m4 deleted file mode 100644 index f26f84c..0000000 --- a/m4/pkg.m4 +++ /dev/null @@ -1,199 +0,0 @@ -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) -# -# Copyright © 2004 Scott James Remnant . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) -AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) -AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# have to call PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_default([$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$$1"; then - pkg_cv_[]$1="$$1" - elif test -n "$PKG_CONFIG"; then - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes ], - [pkg_failed=yes]) - else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - m4_default([$4], [AC_MSG_ERROR( -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT])[]dnl - ]) -elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])[]dnl - ]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - $3 -fi[]dnl -])# PKG_CHECK_MODULES - - -# PKG_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable pkgconfigdir as the location where a module -# should install pkg-config .pc files. By default the directory is -# $libdir/pkgconfig, but the default can be changed by passing -# DIRECTORY. The user can override through the --with-pkgconfigdir -# parameter. -AC_DEFUN([PKG_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([pkgconfigdir], - [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, - [with_pkgconfigdir=]pkg_default) -AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -]) dnl PKG_INSTALLDIR - - -# PKG_NOARCH_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable noarch_pkgconfigdir as the location where a -# module should install arch-independent pkg-config .pc files. By -# default the directory is $datadir/pkgconfig, but the default can be -# changed by passing DIRECTORY. The user can override through the -# --with-noarch-pkgconfigdir parameter. -AC_DEFUN([PKG_NOARCH_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([noarch-pkgconfigdir], - [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, - [with_noarch_pkgconfigdir=]pkg_default) -AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -]) dnl PKG_NOARCH_INSTALLDIR From e8ee3d694acc9aac6bed5092592a7fa84ace5585 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Mon, 23 Jun 2014 23:23:41 +0200 Subject: [PATCH 09/18] Remove autotools --- misc/Makefile.am | 1 - 1 file changed, 1 deletion(-) delete mode 100644 misc/Makefile.am diff --git a/misc/Makefile.am b/misc/Makefile.am deleted file mode 100644 index 0113f9d..0000000 --- a/misc/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -dist_pkgdata_DATA = DHTnodes From 809f472cb4f7a4a6cb192be60ff614de46c7265e Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Mon, 23 Jun 2014 23:24:03 +0200 Subject: [PATCH 10/18] Remove autotools --- Makefile.am | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 Makefile.am diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 2b300dc..0000000 --- a/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS = build misc - -ACLOCAL_AMFLAGS = -I m4 From 773a3f4abff4f4dbc62242c561faba0b0f076bd3 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Mon, 23 Jun 2014 23:24:24 +0200 Subject: [PATCH 11/18] Remove autotools --- configure.ac | 510 --------------------------------------------------- 1 file changed, 510 deletions(-) delete mode 100644 configure.ac diff --git a/configure.ac b/configure.ac deleted file mode 100644 index a800b6a..0000000 --- a/configure.ac +++ /dev/null @@ -1,510 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.65]) -AC_INIT([toxic], [0.4.2], [https://tox.im/]) -AC_CONFIG_AUX_DIR(configure_aux) -AC_CONFIG_SRCDIR([src/toxic.c]) -AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([1.10 -Wall]) -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AC_CONFIG_MACRO_DIR([m4]) - -if test "x${prefix}" = "xNONE"; then - prefix="${ac_default_prefix}" -fi - -DEPSEARCH= -LIBTOXCORE_SEARCH_HEADERS= -LIBTOXCORE_SEARCH_LIBS= -LIBSODIUM_SEARCH_HEADERS= -LIBSODIUM_SEARCH_LIBS= - -LIBTOXCORE_FOUND="no" -NCURSES_FOUND="no" -NCURSES_WIDECHAR_SUPPORT="no" - -AC_ARG_WITH(dependency-search, - AC_HELP_STRING([--with-dependency-search=DIR], - [search for dependencies in DIR, i.e. look for libraries in - DIR/lib and for headers in DIR/include]), - [ - DEPSEARCH="$withval" - ] -) - -if test -n "$DEPSEARCH"; then - CFLAGS="$CFLAGS -I$DEPSEARCH/include" - CPPFLAGS="$CPPFLAGS -I$DEPSEARCH/include" - LDFLAGS="$LDFLAGS -L$DEPSEARCH/lib" - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$DEPSEARCH/lib/pkgconfig:/usr/local/lib/pkgconfig -else - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig -fi - -AC_ARG_WITH(libtoxcore-headers, - AC_HELP_STRING([--with-libtoxcore-headers=DIR], - [search for libtoxcore header files in DIR/tox]), - [ - LIBTOXCORE_SEARCH_HEADERS="$withval" - AC_MSG_NOTICE([Will search for libtoxcore header files in $withval]) - ] -) - -AC_ARG_WITH(libtoxcore-libs, - AC_HELP_STRING([--with-libtoxcore-libs=DIR], - [search for libtoxcore libraries in DIR]), - [ - LIBTOXCORE_SEARCH_LIBS="$withval" - AC_MSG_NOTICE([Will search for libtoxcore libraries in $withval]) - ] -) - -AC_ARG_WITH(libsodium-headers, - AC_HELP_STRING([--with-libsodium-headers=DIR], - [search for libsodium header files in DIR]), - [ - LIBSODIUM_SEARCH_HEADERS="$withval" - AC_MSG_NOTICE([Will search for libsodium header files in $withval]) - ] -) - -AC_ARG_WITH(libsodium-libs, - AC_HELP_STRING([--with-libsodium-libs=DIR], - [search for libsodium libraries in DIR]), - [ - LIBSODIUM_SEARCH_LIBS="$withval" - AC_MSG_NOTICE([Will search for libsodium libraries in $withval]) - ] -) - -WIN32=no -MACH=no -AC_CANONICAL_HOST -case $host_os in - *mingw*) - WIN32="yes" - ;; - darwin*) - MACH=yes - ;; - *freebsd*) - LDFLAGS="$LDFLAGS -L/usr/local/lib" - CFLAGS="$CFLAGS -I/usr/local/include" - CPPFLAGS="$CPPFLAGS -I/usr/local/include" - ;; -esac - -# Checks for programs. -AC_PROG_CC -AM_PROG_CC_C_O - -AC_CHECK_HEADERS( - [limits.h locale.h stdint.h stdlib.h string.h unistd.h wchar.h wctype.h], - [], - [ AC_MSG_ERROR([required header is missing on your system]) ]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_TYPE_SIZE_T -AC_TYPE_UINT16_T -AC_TYPE_UINT32_T -AC_TYPE_UINT64_T -AC_TYPE_UINT8_T - -# Checks for library functions. -AC_FUNC_MALLOC -AC_CHECK_FUNCS( - [iswprint memmove memset mkdir setlocale strchr strdup], - [], - [ AC_MSG_ERROR([required library function is missing on your system])]) - -AX_PTHREAD( [], [ AC_MSG_ERROR([pthreads not found on your system]) ]) - -# pkg-config based tests -PKG_PROG_PKG_CONFIG - -if test -n "$PKG_CONFIG"; then - if test "x$WIN32" != "xyes"; then - PKG_CHECK_MODULES([NCURSES], [ncursesw], - [ - NCURSES_FOUND="yes" - NCURSES_WIDECHAR_SUPPORT="yes" - ], - [ - NCURSES_WIDECHAR_SUPPORT="no" - PKG_CHECK_MODULES([NCURSES], [ncurses], - [ - NCURSES_FOUND="yes" - ], - [ - AC_MSG_WARN([$NCURSES_PKG_ERRORS]) - ]) - ]) - fi -else - AC_MSG_WARN([pkg-config was not found on your sytem]) -fi - -if (test "x$NCURSES_FOUND" = "xno") && (test "x$WIN32" != "xyes"); then - AC_PATH_PROG([CURSES_CONFIG], [ncursesw5-config], [no]) - if test "x$CURSES_CONFIG" != "xno"; then - AC_MSG_CHECKING(ncurses cflags) - NCURSES_CFLAGS=`${CURSES_CONFIG} --cflags` - AC_MSG_RESULT($NCURSES_CFLAGS) - - AC_MSG_CHECKING(ncurses libraries) - NCURSES_LIBS=`${CURSES_CONFIG} --libs` - AC_MSG_RESULT($NCURSES_LIBS) - - AC_SUBST(NCURSES_CFLAGS) - AC_SUBST(NCURSES_LIBS) - NCURSES_FOUND="yes" - NCURSES_WIDECHAR_SUPPORT="yes" - fi -fi - -if (test "x$NCURSES_FOUND" = "xno") && (test "x$WIN32" != "xyes"); then - unset ac_cv_path_CURSES_CONFIG - AC_PATH_PROG([CURSES_CONFIG], [ncursesw5.4-config], [no]) - if test "x$CURSES_CONFIG" != "xno"; then - AC_MSG_CHECKING(ncurses cflags) - NCURSES_CFLAGS=`${CURSES_CONFIG} --cflags` - AC_MSG_RESULT($NCURSES_CFLAGS) - - AC_MSG_CHECKING(ncurses libraries) - NCURSES_LIBS=`${CURSES_CONFIG} --libs` - AC_MSG_RESULT($NCURSES_LIBS) - - AC_SUBST(NCURSES_CFLAGS) - AC_SUBST(NCURSES_LIBS) - NCURSES_FOUND="yes" - NCURSES_WIDECHAR_SUPPORT="yes" - fi -fi - -if (test "x$NCURSES_FOUND" = "xno") && (test "x$WIN32" != "xyes"); then - unset ac_cv_path_CURSES_CONFIG - AC_PATH_PROG([CURSES_CONFIG], [ncurses5-config], [no]) - if test "x$CURSES_CONFIG" != "xno"; then - AC_MSG_CHECKING(ncurses cflags) - NCURSES_CFLAGS=`${CURSES_CONFIG} --cflags` - AC_MSG_RESULT($NCURSES_CFLAGS) - - AC_MSG_CHECKING(ncurses libraries) - NCURSES_LIBS=`${CURSES_CONFIG} --libs` - AC_MSG_RESULT($NCURSES_LIBS) - - AC_SUBST(NCURSES_CFLAGS) - AC_SUBST(NCURSES_LIBS) - NCURSES_FOUND="yes" - fi -fi - -if (test "x$NCURSES_FOUND" = "xno") && (test "x$WIN32" != "xyes"); then - unset ac_cv_path_CURSES_CONFIG - AC_PATH_PROG([CURSES_CONFIG], [ncurses5.4-config], [no]) - if test "x$CURSES_CONFIG" != "xno"; then - AC_MSG_CHECKING(ncurses cflags) - NCURSES_CFLAGS=`${CURSES_CONFIG} --cflags` - AC_MSG_RESULT($NCURSES_CFLAGS) - - AC_MSG_CHECKING(ncurses libraries) - NCURSES_LIBS=`${CURSES_CONFIG} --libs` - AC_MSG_RESULT($NCURSES_LIBS) - - AC_SUBST(NCURSES_CFLAGS) - AC_SUBST(NCURSES_LIBS) - NCURSES_FOUND="yes" - fi -fi - -if test "x$NCURSES_FOUND" = "xno"; then - AC_CHECK_HEADER([curses.h], - [], - [ - AC_MSG_ERROR([headers for the ncurses library were not found on your system]) - ] - ) - - if test "x$WIN32" = "xyes"; then - dnl Check if pdcurses provides wide char support - NCURSES_WIDECHAR_SUPPORT="no" - AC_CHECK_LIB([pdcurses], [clear], - [], - [ - AC_MSG_ERROR([required library pdcurses was not found on your system]) - ] - ) - - AC_CHECK_LIB(ws2_32, main, - [ - WINSOCK2_LIBS="-lws2_32" - AC_SUBST(WINSOCK2_LIBS) - ], - [ - AC_MSG_ERROR([required library winsock2 was not found on the system, please check your MinGW installation]) - ] - ) - AC_DEFINE([_WIN32_WINNT], [0x501], - [enable getaddrinfo/freeaddrinfo on XP and higher]) - else - AC_CHECK_LIB([ncursesw], [wget_wch], - [ - NCURSES_WIDECHAR_SUPPORT="yes" - ], - [ - unset ac_cv_lib_ncursesw_wget_wch - AC_CHECK_LIB([ncursesw], [wget_wch], - [ - NCURSES_WIDECHAR_SUPPORT="yes" - ], - [ - NCURSES_WIDECHAR_SUPPORT="no" - AC_CHECK_LIB([ncurses], [clear], - [], - [ - unset ac_cv_lib_ncurses_clear - AC_CHECK_LIB([ncurses], [clear], - [], - [ - AC_MSG_ERROR([required library ncurses was not found on your system]) - ], - [ - -ltinfo - ] - ) - ] - ) - ], - [ - -ltinfo - ] - ) - ] - ) - fi -fi - -if test -n "$PKG_CONFIG"; then - PKG_CHECK_MODULES(LIBTOXCORE, [libtoxcore], - [ - LIBTOXCORE_FOUND="yes" - ], - [ - AC_MSG_WARN([required library libsodium was not found in requested location $LIBSODIUM_SEARCH_LIBS]) - ]) -fi - -if test "x$LIBTOXCORE_FOUND" = "xno"; then - LIBSODIUM_LIBS= - LIBSODIUM_LDFLAGS= - LDFLAGS_SAVE="$LDFLAGS" - if test -n "$LIBSODIUM_SEARCH_LIBS"; then - LDFLAGS="$LDFLAGS -L$LIBSODIUM_SEARCH_LIBS" - AC_CHECK_LIB(sodium, randombytes_random, - [ - LIBSODIUM_LDFLAGS="-L$LIBSODIUM_SEARCH_LIBS" - LIBSODIUM_LIBS="-lsodium" - ], - [ - AC_MSG_ERROR([required library libsodium was not found in requested location $LIBSODIUM_SEARCH_LIBS]) - ] - ) - else - AC_CHECK_LIB(sodium, randombytes_random, - [], - [ - AC_MSG_ERROR([required library libsodium was not found on your system, please check http://download.libsodium.org/libsodium/releases/]) - ] - ) - fi - - LDFLAGS="$LDFLAGS_SAVE" - AC_SUBST(LIBSODIUM_LIBS) - AC_SUBST(LIBSODIUM_LDFLAGS) - - - - LIBTOXCORE_CFLAGS= - CFLAGS_SAVE="$CFLAGS" - CPPFLAGS_SAVE="$CPPFLAGS" - - if test -n "$LIBTOXCORE_SEARCH_HEADERS"; then - CFLAGS="$CFLAGS -I$LIBTOXCORE_SEARCH_HEADERS" - CPPFLAGS="$CPPFLAGS -I$LIBTOXCORE_SEARCH_HEADERS" - AC_CHECK_HEADER([tox/tox.h], - [ - LIBTOXCORE_CFLAGS="-I$LIBTOXCORE_SEARCH_HEADERS" - ], - [ - AC_MSG_ERROR([headers for the toxcore library were not found on your system]) - ] - ) - else - AC_CHECK_HEADER([tox/tox.h], - [], - [ - AC_MSG_ERROR([headers for the toxcore library were not found on your system]) - ], - ) - fi - CFLAGS="$CFLAGS_SAVE" - CPPFLAGS="$CPPFLAGS_SAVE" - AC_SUBST(LIBTOXCORE_CFLAGS) - - LIBTOXCORE_LIBS= - LIBTOXCORE_LDFLAGS= - LDFLAGS_SAVE="$LDFLAGS" - if test -n "$LIBTOXCORE_SEARCH_LIBS"; then - LDFLAGS="$LDFLAGS $LIBSODIUM_LDFLAGS -L$LIBTOXCORE_SEARCH_LIBS" - AC_CHECK_LIB([toxcore], [tox_new], - [ - LIBTOXCORE_LDFLAGS="-L$LIBTOXCORE_SEARCH_LIBS" - LIBTOXCORE_LIBS="-ltoxcore" - ], - [ - AC_MSG_ERROR([required library toxcore was not found on your system]) - ], - [ - $WINSOCK2_LIBS - $LIBSODIUM_LIBS - ] - ) - else - LDFLAGS="$LDFLAGS $LIBSODIUM_LDFLAGS" - AC_CHECK_LIB([toxcore], [tox_new], - [], - [ - AC_MSG_ERROR([required library toxcore was not found on your system]) - ], - [ - $WINSOCK2_LIBS - $LIBSODIUM_LIBS - ] - ) - fi - LDFLAGS="$LDFLAGS_SAVE" - AC_SUBST(LIBTOXCORE_LIBS) - AC_SUBST(LIBTOXCORE_LDFLAGS) -fi - -AC_CHECK_HEADER([resolv.h], [], - [ - AC_MSG_ERROR([resolv.h header was not found on your system]) - ]) - -AC_CHECK_LIB(resolv, __res_init, [], - [ - AC_MSG_ERROR([libresolv library was not found on your system]) - ]) - -#### -#### A/V Stuff - -AV_SEARCH_DIR= -BUILD_AV="yes" - -AC_ARG_WITH(libtoxav-prefix, - AC_HELP_STRING([--with-libtoxav-prefix=DIR], - [search for libtoxav in DIR, i.e. look for libraries in - DIR/lib and for headers in DIR/include]), - [ - AV_SEARCH_DIR="$withval" - ] -) - -if test -n "$AV_SEARCH_DIR"; then - CFLAGS="$CFLAGS -I$AV_SEARCH_DIR/include" - CPPFLAGS="$CPPFLAGS -I$AV_SEARCH_DIR/include" - LDFLAGS="$LDFLAGS -L$AV_SEARCH_DIR/lib" - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$AV_SEARCH_DIR/lib/pkgconfig -else - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" -fi - -# Check if specified enable -AC_ARG_ENABLE([av], - [AC_HELP_STRING([--disable-av], [build AV support libraries (default: auto)]) ], - [ - if test "x$enableval" = "xno"; then - BUILD_AV="no" - elif test "x$enableval" = "xyes"; then - BUILD_AV="yes" - fi - ] -) - -# Check for A/V library - -if test "x$BUILD_AV" = "xyes"; then - PKG_CHECK_MODULES([OPENAL], [openal], - [], - [ - if test "x$MACH" = "xyes"; then - CFLAGS="$CFLAGS -framework OpenAL" - AC_CHECK_HEADER([OpenAL/al.h], - [ - OPENAL_CFLAGS="-framework OpenAL" - OPENAL_LIBS="-framework OpenAL" - AC_SUBST(OPENAL_CFLAGS) - AC_SUBST(OPENAL_LIBS) - ], - [ - AC_MSG_NOTICE([No openal framework; disabling A/V support]) - BUILD_AV="no" - ] - ) - CFLAGS="$CFLAGS_SAVE" - else - AC_MSG_NOTICE([No openal library; disabling A/V support]) - BUILD_AV="no" - fi - ]) -fi - -if test "x$BUILD_AV" = "xyes"; then - PKG_CHECK_MODULES([LIBTOXAV], [libtoxav], - [ - AC_CHECK_HEADER([tox/toxav.h], - [ - # Place define for audio support - AC_DEFINE([_SUPPORT_AUDIO], [], [Is audio supported]) - AC_MSG_NOTICE([Building with audio support]) - ], - [ - AC_MSG_NOTICE([No A/V headers; disabling A/V support]) - BUILD_AV="no" - ],) - ], - [ - AC_MSG_NOTICE([No A/V library; disabling A/V support]) - BUILD_AV="no" - ]) -fi - -AM_CONDITIONAL(BUILD_AV, test "x$BUILD_AV" = "xyes") - -TOXIC_VERSION="$PACKAGE_VERSION" -AC_PATH_PROG([GIT], [git], [no]) -if test "x$GIT" != "xno"; then - if test -d ${srcdir}/.git; then - TOXIC_VERSION="${TOXIC_VERSION}_r`${GIT} rev-list HEAD --count`" - fi -fi -AC_SUBST(TOXIC_VERSION) - -eval PACKAGE_DATADIR="${datadir}/${PACKAGE}" -eval PACKAGE_DATADIR="${PACKAGE_DATADIR}" -AC_DEFINE_UNQUOTED(PACKAGE_DATADIR, "$PACKAGE_DATADIR", [toxic data directory]) - -if test "x$NCURSES_WIDECHAR_SUPPORT" = "xyes"; then - AC_DEFINE([HAVE_WIDECHAR], [1], [ncurses wide char support available]) - AC_DEFINE([_XOPEN_SOURCE_EXTENDED], [1], - [enable X/Open Portability Guide functionality]) -fi - -AC_CONFIG_FILES([Makefile - misc/Makefile - build/Makefile]) -AC_OUTPUT From c53600b550e50b8a4b95c3d80f735864faeceebe Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Tue, 24 Jun 2014 00:17:14 +0200 Subject: [PATCH 12/18] Makefile: add per-system defaults This is only an empty structure, but I hope it will help for add per-system defaults in future --- src/Makefile | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 30d5a7b..3ae784e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,18 +4,61 @@ VERSION = $(TOXIC_VERSION)_r$(REV) LIBS = libtoxcore ncurses -CFLAGS = -DTOXICVER="\"$(VERSION)\"" -std=gnu99 -pthread -LDFLAGS = -ldl -lresolv +CFLAGS ?= $(USER_CFLAGS) -DTOXICVER="\"$(VERSION)\"" -std=gnu99 -pthread +LDFLAGS ?= $(USER_LDFLAGS) DESTDIR ?= /usr/local OBJ = chat.o chat_commands.o configdir.o dns.o execute.o OBJ += file_senders.o friendlist.o global_commands.o groupchat.o line_info.o OBJ += log.o misc_tools.o prompt.o settings.o toxic.o toxic_strings.o windows.o +# Variables for audio support AUDIO_LIBS = libtoxav openal AUDIO_CFLAGS = -D_SUPPORT_AUDIO AUDIO_OBJ = device.o audio_call.o +# Check on wich system we are running +ifeq ($(OS), Windows_NT) + CFLAGS += + LDFLAGS += + ifeq ($(PROCESSOR_ARCHITECTURE), AMD64) + CFLAGS += + LDFLAGS += + endif + ifeq ($(PROCESSOR_ARCHITECTURE), x86) + CFLAGS += + LDFLAGS += + endif +else + UNAME_S = $(shell uname -s) + ifeq ($(UNAME_S), Linux) + CFLAGS += + LDFLAGS += -ldl -lresolv + endif + ifeq ($(UNAME_S), Darwin) + CFLAGS += + LDFLAGS += + endif + ifeq ($(UNAME_S), Solaris) + CFLAGS += + LDFLAGS += + endif + UNAME_P = $(shell uname -p) + ifeq ($(UNAME_P), x86_64) + CFLAGS += + LDFLAGS += + endif + ifneq ($(filter %86, $(UNAME_P)),) + CFLAGS += + LDFLAGS += + endif + ifneq ($(filter arm%, $(UNAME_P)),) + CFLAGS += + LDFLAGS += + endif +endif + +# Check if we can build audio CHECK_AUDIO_LIBS = $(shell pkg-config $(AUDIO_LIBS) || echo -n "error") ifneq ($(CHECK_AUDIO_LIBS), error) LIBS += $(AUDIO_LIBS) @@ -30,6 +73,7 @@ $(warning WARNING -- $(MISSING_AUDIO_LIBS)) endif endif +# Check if we can build Toxic CHECK_LIBS = $(shell pkg-config $(LIBS) || echo -n "error") ifneq ($(CHECK_LIBS), error) CFLAGS += $(shell pkg-config --cflags $(LIBS)) @@ -44,6 +88,7 @@ $(error ERROR) endif endif +# Targets all: toxic toxic: $(OBJ) From 47b9648f85a032edd7fda1aa8a895bcdc134d429 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Tue, 24 Jun 2014 00:23:37 +0200 Subject: [PATCH 13/18] Makefile: fix typo --- src/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Makefile b/src/Makefile index 3ae784e..8e6a85d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -43,16 +43,16 @@ else CFLAGS += LDFLAGS += endif - UNAME_P = $(shell uname -p) - ifeq ($(UNAME_P), x86_64) + UNAME_M = $(shell uname -m) + ifeq ($(UNAME_M), x86_64) CFLAGS += LDFLAGS += endif - ifneq ($(filter %86, $(UNAME_P)),) + ifneq ($(filter %86, $(UNAME_M)),) CFLAGS += LDFLAGS += endif - ifneq ($(filter arm%, $(UNAME_P)),) + ifneq ($(filter arm%, $(UNAME_M)),) CFLAGS += LDFLAGS += endif From 7b8cf6521891c7b28eca1836485af1281b21d11b Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Tue, 24 Jun 2014 09:02:06 +0200 Subject: [PATCH 14/18] Makefile: remove Windows support and bump version --- src/Makefile | 63 ++++++++++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 37 deletions(-) diff --git a/src/Makefile b/src/Makefile index 8e6a85d..929d896 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,4 +1,4 @@ -TOXIC_VERSION = 0.4.1 +TOXIC_VERSION = 0.4.2 REV = $(shell git rev-list HEAD --count) VERSION = $(TOXIC_VERSION)_r$(REV) @@ -18,44 +18,33 @@ AUDIO_CFLAGS = -D_SUPPORT_AUDIO AUDIO_OBJ = device.o audio_call.o # Check on wich system we are running -ifeq ($(OS), Windows_NT) +UNAME_S = $(shell uname -s) +ifeq ($(UNAME_S), Linux) + CFLAGS += + LDFLAGS += -ldl -lresolv +endif +ifeq ($(UNAME_S), Darwin) + CFLAGS += + LDFLAGS += +endif +ifeq ($(UNAME_S), Solaris) + CFLAGS += + LDFLAGS += +endif + +# Check on which platform we are running +UNAME_M = $(shell uname -m) +ifeq ($(UNAME_M), x86_64) + CFLAGS += + LDFLAGS += +endif +ifneq ($(filter %86, $(UNAME_M)),) + CFLAGS += + LDFLAGS += +endif +ifneq ($(filter arm%, $(UNAME_M)),) CFLAGS += LDFLAGS += - ifeq ($(PROCESSOR_ARCHITECTURE), AMD64) - CFLAGS += - LDFLAGS += - endif - ifeq ($(PROCESSOR_ARCHITECTURE), x86) - CFLAGS += - LDFLAGS += - endif -else - UNAME_S = $(shell uname -s) - ifeq ($(UNAME_S), Linux) - CFLAGS += - LDFLAGS += -ldl -lresolv - endif - ifeq ($(UNAME_S), Darwin) - CFLAGS += - LDFLAGS += - endif - ifeq ($(UNAME_S), Solaris) - CFLAGS += - LDFLAGS += - endif - UNAME_M = $(shell uname -m) - ifeq ($(UNAME_M), x86_64) - CFLAGS += - LDFLAGS += - endif - ifneq ($(filter %86, $(UNAME_M)),) - CFLAGS += - LDFLAGS += - endif - ifneq ($(filter arm%, $(UNAME_M)),) - CFLAGS += - LDFLAGS += - endif endif # Check if we can build audio From 5066ea637b859609a214d44f7f15d677e23c833b Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Tue, 24 Jun 2014 10:53:24 +0200 Subject: [PATCH 15/18] Update .travis.yml: remove autotools --- .travis.yml | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8eb6064..cd40cae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,56 +4,57 @@ compiler: - clang before_script: - #installing libsodium, needed for Core + # Installing libsodium, needed for toxcore - git clone git://github.com/jedisct1/libsodium.git > /dev/null - cd libsodium - git checkout tags/0.4.2 > /dev/null - ./autogen.sh > /dev/null - ./configure > /dev/null - - make check -j3 > /dev/null - - sudo make install >/dev/null - - cd .. - #installing yasm, needed for compiling vpx - - sudo apt-get install yasm > /dev/null - #installing libconfig, needed for DHT_bootstrap_daemon - - wget http://www.hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz > /dev/null - - tar -xvzf libconfig-1.4.9.tar.gz > /dev/null - - cd libconfig-1.4.9 - - ./configure > /dev/null - - make -j3 > /dev/null + - make check -j2 || make check || exit 1 > /dev/null - sudo make install > /dev/null - cd .. - #installing libopus, needed for audio encoding/decoding + # Installing yasm, needed for compiling vpx + - sudo apt-get -yq install yasm > /dev/null + # Installing libconfig, needed for DHT_bootstrap_daemon + #- wget http://www.hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz > /dev/null + #- tar -xvzf libconfig-1.4.9.tar.gz > /dev/null + #- cd libconfig-1.4.9 + #- ./configure > /dev/null + #- make -j2 || make || exit 1 > /dev/null + #- sudo make install > /dev/null + #- cd .. + # Installing libopus, needed for audio encoding/decoding - wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz > /dev/null - tar xzf opus-1.0.3.tar.gz > /dev/null - cd opus-1.0.3 - ./configure > /dev/null - - make -j3 > /dev/null + - make -j2 || make || exit 1 > /dev/null - sudo make install > /dev/null - cd .. - #installing vpx + # Installing vpx - git clone http://git.chromium.org/webm/libvpx.git > /dev/null - cd libvpx - ./configure --enable-shared > /dev/null - - make -j3 >/dev/null + - make -j2 || make || exit 1 > /dev/null - sudo make install > /dev/null - cd .. - #creating libraries links and updating cache + # Creating libraries links and updating cache - sudo ldconfig > /dev/null -# creating librarys' links and updating cache - - sudo ldconfig - - git clone https://github.com/irungentoo/ProjectTox-Core.git toxcore + # Installing toxcore + - git clone https://github.com/irungentoo/toxcore.git toxcore - cd toxcore - autoreconf -i - ./configure --disable-tests --disable-ntox --disable-daemon --enable-av - - make -j2 + - make -j2 || make || exit 1 - sudo make install - cd .. - - sudo apt-get install libopenal-dev -yq + # Installing openal + - sudo apt-get -yq install libopenal-dev script: - - autoreconf -i - - ./configure - - make -j2 + #- autoreconf -i + #- ./configure + - cd src + - make -j2 || make || exit 1 notifications: email: false From 57742bcd876e20c385bbbadc03a180b07db284b3 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Tue, 24 Jun 2014 11:01:32 +0200 Subject: [PATCH 16/18] Makefile: use instead of --- src/Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Makefile b/src/Makefile index 929d896..ba6dbc4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -50,9 +50,9 @@ endif # Check if we can build audio CHECK_AUDIO_LIBS = $(shell pkg-config $(AUDIO_LIBS) || echo -n "error") ifneq ($(CHECK_AUDIO_LIBS), error) - LIBS += $(AUDIO_LIBS) - CFLAGS += $(AUDIO_CFLAGS) - OBJ += $(AUDIO_OBJ) + LIBS += $(AUDIO_LIBS) + CFLAGS += $(AUDIO_CFLAGS) + OBJ += $(AUDIO_OBJ) else ifneq ($(MAKECMDGOALS), clean) MISSING_AUDIO_LIBS = $(shell for lib in $(AUDIO_LIBS) ; do if ! pkg-config $$lib ; then echo $$lib ; fi ; done) @@ -65,8 +65,8 @@ endif # Check if we can build Toxic CHECK_LIBS = $(shell pkg-config $(LIBS) || echo -n "error") ifneq ($(CHECK_LIBS), error) - CFLAGS += $(shell pkg-config --cflags $(LIBS)) - LDFLAGS += $(shell pkg-config --libs $(LIBS)) + CFLAGS += $(shell pkg-config --cflags $(LIBS)) + LDFLAGS += $(shell pkg-config --libs $(LIBS)) else ifneq ($(MAKECMDGOALS), clean) MISSING_LIBS = $(shell for lib in $(LIBS) ; do if ! pkg-config $$lib ; then echo $$lib ; fi ; done) @@ -81,18 +81,18 @@ endif all: toxic toxic: $(OBJ) - $(CC) $(CFLAGS) -o toxic $(OBJ) $(LDFLAGS) + $(CC) $(CFLAGS) -o toxic $(OBJ) $(LDFLAGS) install: toxic - mkdir -pv $(DESTDIR)/bin - install -m 0755 toxic $(DESTDIR)/bin + mkdir -pv $(DESTDIR)/bin + install -m 0755 toxic $(DESTDIR)/bin %.o: %.c - $(CC) $(CFLAGS) -o $*.o -c $*.c - $(CC) -MM $(CFLAGS) $*.c > $*.d + $(CC) $(CFLAGS) -o $*.o -c $*.c + $(CC) -MM $(CFLAGS) $*.c > $*.d clean: - rm -rf *.d *.o toxic + rm -rf *.d *.o toxic -include $(OBJ:.o=.d) From 562483823c8fbe9f36c0a30ee0aa0eda731937f9 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Tue, 24 Jun 2014 11:53:02 +0200 Subject: [PATCH 17/18] Makefile: move to "build/" --- {src => build}/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename {src => build}/Makefile (95%) diff --git a/src/Makefile b/build/Makefile similarity index 95% rename from src/Makefile rename to build/Makefile index ba6dbc4..0eb7cd9 100644 --- a/src/Makefile +++ b/build/Makefile @@ -6,6 +6,7 @@ LIBS = libtoxcore ncurses CFLAGS ?= $(USER_CFLAGS) -DTOXICVER="\"$(VERSION)\"" -std=gnu99 -pthread LDFLAGS ?= $(USER_LDFLAGS) +SRC_DIR = ../src DESTDIR ?= /usr/local OBJ = chat.o chat_commands.o configdir.o dns.o execute.o @@ -87,9 +88,9 @@ install: toxic mkdir -pv $(DESTDIR)/bin install -m 0755 toxic $(DESTDIR)/bin -%.o: %.c - $(CC) $(CFLAGS) -o $*.o -c $*.c - $(CC) -MM $(CFLAGS) $*.c > $*.d +%.o: $(SRC_DIR)/%.c + $(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c + $(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $*.d clean: rm -rf *.d *.o toxic From 9225af06b1aadf2ff59febeb2d5f4c433f25baa4 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Tue, 24 Jun 2014 11:53:10 +0200 Subject: [PATCH 18/18] Update .travis.yml: moved makefile in "build/" --- .travis.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index cd40cae..4d4f74c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ compiler: - clang before_script: + # Installing yasm (needed for compiling vpx) and openal + - sudo apt-get -yq install yasm libopenal-dev # Installing libsodium, needed for toxcore - git clone git://github.com/jedisct1/libsodium.git > /dev/null - cd libsodium @@ -13,16 +15,6 @@ before_script: - make check -j2 || make check || exit 1 > /dev/null - sudo make install > /dev/null - cd .. - # Installing yasm, needed for compiling vpx - - sudo apt-get -yq install yasm > /dev/null - # Installing libconfig, needed for DHT_bootstrap_daemon - #- wget http://www.hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz > /dev/null - #- tar -xvzf libconfig-1.4.9.tar.gz > /dev/null - #- cd libconfig-1.4.9 - #- ./configure > /dev/null - #- make -j2 || make || exit 1 > /dev/null - #- sudo make install > /dev/null - #- cd .. # Installing libopus, needed for audio encoding/decoding - wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz > /dev/null - tar xzf opus-1.0.3.tar.gz > /dev/null @@ -48,12 +40,8 @@ before_script: - make -j2 || make || exit 1 - sudo make install - cd .. - # Installing openal - - sudo apt-get -yq install libopenal-dev script: - #- autoreconf -i - #- ./configure - - cd src + - cd build - make -j2 || make || exit 1 notifications: email: false