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

Argp #1

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
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
10 changes: 7 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

include $(top_srcdir)/aminclude.am

SUBDIRS = src
if PLATFORM_WIN32
if WITH_ARGP
LIBARGP = libargp
endif
endif

SUBDIRS = $(LIBARGP) src

EXTRA_DIST = \
doxygen.cfg \
Expand All @@ -16,8 +22,6 @@ dist_doc_DATA = \
INSTALL \
NEWS



# Remove doc directory on uninstall
uninstall-local:
-rm -r $(docdir)
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ do
echo processing $dr
( cd $dr

aclocalinclude="$ACLOCAL_FLAGS"
aclocalinclude="$ACLOCAL_FLAGS -I m4"

if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
echo "Creating $dr/aclocal.m4 ..."
Expand Down
39 changes: 31 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
dnl Process this file with autoconf to produce a configure script.

AC_INIT([multicast], [0.2.5.2], [https://github.com/anubisg1/simple-multicast])
AC_INIT([multicast], [0.3], [https://github.com/anubisg1/simple-multicast])

AC_CONFIG_HEADERS([config.h])
AC_CHECK_HEADERS([ws2ipdef.h], [], [],
[[#include <winsock2.h>
]])

AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([1.11])

AM_SILENT_RULES([yes])

AC_PROG_CC
LT_INIT([win32-dll])

######################################################################
# DOXYGEN SUPPORT
Expand All @@ -38,7 +34,7 @@ case $host_os in
platform_win32=yes
native_win32=yes
;;
pw32* | *cygwin*)
pw32* | *cygwin* | *msys* )
platform_win32=yes
native_win32=no
;;
Expand All @@ -49,7 +45,32 @@ case $host_os in
esac
AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = "xyes")
AM_CONDITIONAL(NATIVE_WIN32, test x"$native_win32" = "xyes")
AM_CONDITIONAL([WITH_ARGP], [test "$with_argp" = yes])

AM_COND_IF([PLATFORM_WIN32], [
AC_CHECK_HEADERS([winsock2.h])
AC_CHECK_HEADERS([ws2ipdef.h], [], [],
[[#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
]])

AC_MSG_CHECKING([whether to enable libargp])
AC_ARG_WITH(argp,
AS_HELP_STRING([--with-argp], [build against the shipped libargp]),
with_argp=$withval,
with_argp=no)
AC_MSG_RESULT($with_argp)
# AM_CONDITIONAL([WITH_ARGP], [test "$with_argp" = yes])

AM_COND_IF([WITH_ARGP], AC_CONFIG_SUBDIRS([libargp]), [
AC_CHECK_HEADERS([argp.h])
AC_CHECK_LIB(argp, argp_parse, [], [
echo "Error! You must have libargp on windows. Run configure with --with-argp"
exit -1
])
])
])

AC_OUTPUT([
Makefile
Expand All @@ -62,6 +83,8 @@ AC_OUTPUT
echo
echo Prefix..........................: $prefix
echo
echo Build also libargp..............: $with_argp
echo
echo
echo "Ready to make simple-multicast Type 'make' to continue."
echo
Expand Down
7 changes: 7 additions & 0 deletions libargp/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Process this file with automake to produce Makefile.in.

AUTOMAKE_OPTIONS = 1.5 foreign

SUBDIRS = gllib m4

ACLOCAL_AMFLAGS = -I m4
Loading