From: RLB Date: Fri, 5 Aug 2011 20:49:32 +0000 (-0400) Subject: Darin/OS X Build Fixes.. Now automatically looks for glibtool if it exists X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=84c2cfeb709740326c83b2e6758e430894c5dee7;p=cobramush.git Darin/OS X Build Fixes.. Now automatically looks for glibtool if it exists in a darwin environment.. Otherwise it looks for libtool, thinking we're in a GNU environment.. Could probably use the same basic idea for a FreeBSD Environment Should we ever test a build there. --- diff --git a/Makefile.in b/Makefile.in index 4697972..7f1688e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -19,6 +19,7 @@ CC=@CC@ SQL_CFLAGS=@MYSQL_CFLAGS@ @POSTGRESQL_CFLAGS@ @SQLITE3_CFLAGS@ SQL_LDFLAGS=@MYSQL_LDFLAGS@ @POSTGRESQL_LDFLAGS@ @SQLITE3_LDFLAGS@ +LIBTOOL=@LIBTOOL@ CPPFLAGS=@CPPFLAGS@ CCFLAGS=@CFLAGS@ -I.. -I../hdrs @OPENSSL_INCLUDES@ @CPPFLAGS@ @PCRE_CFLAGS@ -Werror diff --git a/configure.ac b/configure.ac index e6d0b68..602b278 100644 --- a/configure.ac +++ b/configure.ac @@ -15,6 +15,17 @@ m4_include(m4/confsetup.m4) AC_CANONICAL_BUILD +host_os=`uname | sed 's/^(\s)*//'` + +# Search for glibtool +if test $host_os = "Darwin"; then + AC_PATH_PROG(LIBTOOL, glibtool) +else + AC_PATH_PROG(LIBTOOL, libtool) +fi + +echo $host_os; + if test "x$CFLAGS" = "x"; then CFLAGS="-O" DEFAULT_CFLAGS=yes diff --git a/src/Makefile.in b/src/Makefile.in index a545048..5e52ecd 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -8,7 +8,6 @@ OUTFILES=buildinf netmud info_slave # Libs EXCEPT for SQL ones LIBS=$(CLIBS) -LIBTOOL=libtool CFLAGS=$(CCFLAGS) $(SQL_CFLAGS) diff --git a/src/bsd.c b/src/bsd.c index 1a5351d..b4bd7a9 100644 --- a/src/bsd.c +++ b/src/bsd.c @@ -3467,6 +3467,12 @@ dump_info(DESC * call_by) queue_string_eol(call_by, "### End INFO"); } +#ifndef HAVE_SSL +#define SSL_WHO_ENTRY(x) ' ' +#else +#define SSL_WHO_ENTRY(x) x->ssl ? 'S' : ' ' +#endif + COMMAND(cmd_dump_users) { DESC *d; @@ -3555,12 +3561,8 @@ COMMAND(cmd_dump_users) player) ? unparse_dbref(Location(d->player)) : "#-1", time_format_1(now - d->connected_at), time_format_2(now - d->last_time), csite ? d->cmds : 0, - csite ? d->descriptor : 0, -#ifdef HAVE_SSL - d->ssl ? 'S' : ' ', -#else - ' ', -#endif + csite ? d->descriptor : 1, + SSL_WHO_ENTRY(d), csite ? d->addr : "---"); tbuf1[78] = '\0'; if (Dark(d->player)) { @@ -3580,11 +3582,7 @@ COMMAND(cmd_dump_users) "#-1", time_format_1(now - d->connected_at), time_format_2(now - d->last_time), csite ? d->cmds : 0, csite ? d->descriptor : 0, -#ifdef HAVE_SSL - d->ssl ? 'S' : ' ', -#else - ' ', -#endif + SSL_WHO_ENTRY(d), csite ? d->input_chars : 0, csite ? d->output_chars : 0, csite ? d->output_size : 0); } else { @@ -3623,11 +3621,7 @@ COMMAND(cmd_dump_users) T("Connecting..."), "#-1", time_format_1(now - d->connected_at), time_format_2(now - d->last_time), d->cmds, d->descriptor, -#ifdef HAVE_SSL - d->ssl ? 'S' : ' ', -#else - ' ', -#endif + SSL_WHO_ENTRY(d), d->addr); tbuf1[78] = '\0'; } else { @@ -3637,11 +3631,7 @@ COMMAND(cmd_dump_users) T("Connecting..."), "#-1", time_format_1(now - d->connected_at), time_format_2(now - d->last_time), d->cmds, d->descriptor, -#ifdef HAVE_SSL - d->ssl ? 'S' : ' ', -#else - ' ', -#endif + SSL_WHO_ENTRY(d), d->input_chars, d->output_chars, d->output_size); } #ifdef COLOREDWHO diff --git a/utils/preparedist.sh b/utils/preparedist.sh index 1b1f50a..d9b6526 100755 --- a/utils/preparedist.sh +++ b/utils/preparedist.sh @@ -30,6 +30,7 @@ mv hdrs/funs.h win32/ # Step 3: run autoconf echo "Running autoconf to generate configure" +aclocal autoconf # Step 4: generate changes.txt