diff --git a/configure.ac b/configure.ac index 10351a708..57fbdb84b 100644 --- a/configure.ac +++ b/configure.ac @@ -64,7 +64,7 @@ AC_CHECK_FILES([/proc/self/stat]) AC_CHECK_FILE([/usr/pkg/lib],[AC_SUBST(LIBDIR,[-L/usr/pkg/lib\ -R/usr/pkg/lib])]) AC_CHECK_FILE([/usr/pkg/include],[AC_SUBST(INCLUDEDIR,[-I/usr/pkg/include])]) -AC_CHECK_FUNCS( [wprintf futimes wcwidth wcswidth] ) +AC_CHECK_FUNCS( [wprintf futimes wcwidth wcswidth getopt_long] ) AC_CHECK_HEADERS([getopt.h termio.h sys/resource.h]) # Check for RLIMIT_AS in sys/resource.h. diff --git a/main.c b/main.c index 1e1fbf62f..f9e8f3fc9 100644 --- a/main.c +++ b/main.c @@ -111,7 +111,7 @@ int main( int argc, char **argv ) while( 1 ) { -#ifdef __GLIBC__ +#ifdef HAVE_GETOPT_LONG static struct option long_options[] = { diff --git a/mimedb.c b/mimedb.c index 62eb0d79e..bd3b75ec2 100644 --- a/mimedb.c +++ b/mimedb.c @@ -1018,7 +1018,7 @@ int main (int argc, char *argv[]) */ while( 1 ) { -#ifdef __GLIBC__ +#ifdef HAVE_GETOPT_LONG static struct option long_options[] = { diff --git a/set_color.c b/set_color.c index 2265776e0..1a5c0b49d 100644 --- a/set_color.c +++ b/set_color.c @@ -114,7 +114,7 @@ int main( int argc, char **argv ) while( 1 ) { -#ifdef __GLIBC__ +#ifdef HAVE_GETOPT_LONG static struct option long_options[] = { diff --git a/tokenize.c b/tokenize.c index bad79a9fc..8690dce22 100644 --- a/tokenize.c +++ b/tokenize.c @@ -32,7 +32,7 @@ int main( int argc, char **argv ) while( 1 ) { -#ifdef __GLIBC__ +#ifdef HAVE_GETOPT_LONG static struct option long_options[] = {